@modern-js/utils 2.69.7 → 3.0.0-alpha.1
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/cjs/cli/alias.js +76 -70
- package/dist/cjs/cli/applyOptionsChain.js +44 -45
- package/dist/cjs/cli/babel.js +100 -119
- package/dist/cjs/cli/commands.js +61 -59
- package/dist/cjs/cli/common.js +45 -37
- package/dist/cjs/cli/config.js +36 -30
- package/dist/cjs/cli/constants.js +124 -161
- package/dist/cjs/cli/ensure.js +52 -45
- package/dist/cjs/cli/fs.js +41 -38
- package/dist/cjs/cli/get/config.js +43 -38
- package/dist/cjs/cli/get/data.js +108 -125
- package/dist/cjs/cli/get/index.js +109 -58
- package/dist/cjs/cli/index.js +202 -63
- package/dist/cjs/cli/is/config.js +75 -71
- package/dist/cjs/cli/is/env.js +49 -37
- package/dist/cjs/cli/is/index.js +76 -25
- package/dist/cjs/cli/is/project.js +139 -135
- package/dist/cjs/cli/is/type.js +65 -49
- package/dist/cjs/cli/logger.js +36 -27
- package/dist/cjs/cli/monorepo.js +100 -96
- package/dist/cjs/cli/package.js +85 -82
- package/dist/cjs/cli/path.js +101 -82
- package/dist/cjs/cli/port.js +71 -74
- package/dist/cjs/cli/prettyInstructions.js +106 -116
- package/dist/cjs/cli/require.js +116 -136
- package/dist/cjs/cli/route.js +67 -77
- package/dist/cjs/cli/runtimeExports.js +16 -70
- package/dist/cjs/cli/version.js +53 -42
- package/dist/cjs/cli/watch.js +79 -72
- package/dist/cjs/compiled.js +199 -128
- package/dist/cjs/import.js +58 -33
- package/dist/cjs/index.js +69 -23
- package/dist/cjs/universal/constants.js +77 -67
- package/dist/cjs/universal/index.js +33 -25
- package/dist/cjs/universal/path.js +33 -27
- package/dist/cjs/universal/pluginDagSort.js +69 -68
- package/dist/compiled/address/index.js +171 -1
- package/dist/compiled/browserslist/index.js +1329 -1
- package/dist/compiled/chalk/index.js +2368 -1
- package/dist/compiled/chokidar/index.js +4138 -16
- package/dist/compiled/chokidar/index.js.LICENSE.txt +41 -0
- package/dist/compiled/commander/index.js +1540 -1
- package/dist/compiled/debug/index.js +621 -1
- package/dist/compiled/dotenv/index.js +101 -1
- package/dist/compiled/dotenv-expand/index.js +54 -1
- package/dist/compiled/execa/index.js +1738 -1
- package/dist/compiled/fast-glob/index.js +4645 -17
- package/dist/compiled/fast-glob/index.js.LICENSE.txt +38 -0
- package/dist/compiled/filesize/index.js +193 -4
- package/dist/compiled/filesize/index.js.LICENSE.txt +7 -0
- package/dist/compiled/fs-extra/index.js +2222 -1
- package/dist/compiled/glob/index.js +2011 -1
- package/dist/compiled/globby/index.js +690 -1
- package/dist/compiled/gzip-size/index.js +157 -1
- package/dist/compiled/import-lazy/index.js +45 -1
- package/dist/compiled/inquirer/index.js +20162 -4
- package/dist/compiled/inquirer/index.js.LICENSE.txt +7 -0
- package/dist/compiled/js-yaml/index.js +2188 -1
- package/dist/compiled/json5/index.js +983 -1
- package/dist/compiled/lodash/index.js +0 -4
- package/dist/compiled/mime-types/index.js +108 -6
- package/dist/compiled/mime-types/index.js.LICENSE.txt +13 -0
- package/dist/compiled/minimist/index.js +202 -1
- package/dist/compiled/nanoid/index.js +83 -1
- package/dist/compiled/ora/index.js +3936 -3
- package/dist/compiled/ora/index.js.LICENSE.txt +1 -0
- package/dist/compiled/pkg-up/index.js +177 -1
- package/dist/compiled/semver/index.js +1779 -1
- package/dist/compiled/signale/index.js +1704 -1
- package/dist/compiled/slash/index.js +32 -1
- package/dist/compiled/strip-ansi/index.js +34 -1
- package/dist/compiled/tsconfig-paths/index.js +629 -1
- package/dist/compiled/upath/index.js +135 -1
- package/dist/compiled/url-join/index.js +61 -1
- package/dist/compiled/webpack-chain/index.js +1475 -1
- package/dist/esm/cli/alias.mjs +31 -0
- package/dist/esm/cli/applyOptionsChain.mjs +16 -0
- package/dist/esm/cli/babel.mjs +76 -0
- package/dist/esm/cli/commands.mjs +23 -0
- package/dist/esm/cli/common.mjs +11 -0
- package/dist/esm/cli/config.mjs +5 -0
- package/dist/esm/cli/constants.mjs +29 -0
- package/dist/esm/cli/ensure.mjs +9 -0
- package/dist/esm/cli/fs.mjs +9 -0
- package/dist/esm/cli/get/config.mjs +14 -0
- package/dist/esm/cli/get/data.mjs +57 -0
- package/dist/esm/cli/get/index.mjs +18 -0
- package/dist/{esm-node/cli/index.js → esm/cli/index.mjs} +0 -1
- package/dist/esm/cli/is/config.mjs +34 -0
- package/dist/esm/cli/is/env.mjs +6 -0
- package/dist/esm/cli/is/project.mjs +104 -0
- package/dist/esm/cli/is/type.mjs +26 -0
- package/dist/esm/cli/logger.mjs +2 -0
- package/dist/esm/cli/monorepo.mjs +50 -0
- package/dist/esm/cli/package.mjs +51 -0
- package/dist/esm/cli/path.mjs +35 -0
- package/dist/esm/cli/port.mjs +35 -0
- package/dist/esm/cli/prettyInstructions.mjs +68 -0
- package/dist/esm/cli/require.mjs +79 -0
- package/dist/esm/cli/route.mjs +36 -0
- package/dist/esm/cli/runtimeExports.mjs +0 -0
- package/dist/esm/cli/version.mjs +21 -0
- package/dist/esm/cli/watch.mjs +40 -0
- package/dist/esm/compiled.mjs +115 -0
- package/dist/esm/import.mjs +25 -0
- package/dist/esm/universal/constants.mjs +13 -0
- package/dist/{esm-node/universal/index.js → esm/universal/index.mjs} +1 -3
- package/dist/esm/universal/path.mjs +2 -0
- package/dist/esm/universal/pluginDagSort.mjs +41 -0
- package/dist/esm-node/cli/alias.mjs +31 -0
- package/dist/esm-node/cli/applyOptionsChain.mjs +16 -0
- package/dist/esm-node/cli/babel.mjs +76 -0
- package/dist/esm-node/cli/commands.mjs +23 -0
- package/dist/esm-node/cli/common.mjs +11 -0
- package/dist/esm-node/cli/config.mjs +5 -0
- package/dist/esm-node/cli/constants.mjs +29 -0
- package/dist/esm-node/cli/ensure.mjs +9 -0
- package/dist/esm-node/cli/fs.mjs +9 -0
- package/dist/esm-node/cli/get/config.mjs +14 -0
- package/dist/esm-node/cli/get/data.mjs +57 -0
- package/dist/esm-node/cli/get/index.mjs +18 -0
- package/dist/esm-node/cli/index.mjs +22 -0
- package/dist/esm-node/cli/is/config.mjs +34 -0
- package/dist/esm-node/cli/is/env.mjs +6 -0
- package/dist/esm-node/cli/is/index.mjs +4 -0
- package/dist/esm-node/cli/is/project.mjs +104 -0
- package/dist/esm-node/cli/is/type.mjs +26 -0
- package/dist/esm-node/cli/logger.mjs +2 -0
- package/dist/esm-node/cli/monorepo.mjs +50 -0
- package/dist/esm-node/cli/package.mjs +51 -0
- package/dist/esm-node/cli/path.mjs +35 -0
- package/dist/esm-node/cli/port.mjs +35 -0
- package/dist/esm-node/cli/prettyInstructions.mjs +68 -0
- package/dist/esm-node/cli/require.mjs +79 -0
- package/dist/esm-node/cli/route.mjs +36 -0
- package/dist/esm-node/cli/runtimeExports.mjs +0 -0
- package/dist/esm-node/cli/version.mjs +21 -0
- package/dist/esm-node/cli/watch.mjs +40 -0
- package/dist/esm-node/compiled.mjs +115 -0
- package/dist/esm-node/import.mjs +25 -0
- package/dist/esm-node/index.mjs +3 -0
- package/dist/esm-node/universal/constants.mjs +13 -0
- package/dist/esm-node/universal/index.mjs +2 -0
- package/dist/esm-node/universal/path.mjs +2 -0
- package/dist/esm-node/universal/pluginDagSort.mjs +41 -0
- package/dist/types/cli/constants.d.ts +2 -26
- package/dist/types/cli/get/data.d.ts +0 -1
- package/dist/types/cli/index.d.ts +0 -1
- package/dist/types/cli/is/config.d.ts +1 -1
- package/dist/types/cli/runtimeExports.d.ts +1 -4
- package/dist/types/cli/watch.d.ts +1 -1
- package/dist/types/compiled.d.ts +0 -5
- package/dist/types/universal/constants.d.ts +4 -7
- package/package.json +27 -27
- package/rslib.config.mts +140 -0
- package/dist/cjs/cli/action.js +0 -55
- package/dist/cjs/universal/formatWebpack.js +0 -127
- package/dist/esm/cli/action.js +0 -68
- package/dist/esm/cli/alias.js +0 -43
- package/dist/esm/cli/applyOptionsChain.js +0 -29
- package/dist/esm/cli/babel.js +0 -122
- package/dist/esm/cli/commands.js +0 -39
- package/dist/esm/cli/common.js +0 -20
- package/dist/esm/cli/config.js +0 -11
- package/dist/esm/cli/constants.js +0 -114
- package/dist/esm/cli/ensure.js +0 -16
- package/dist/esm/cli/fs.js +0 -65
- package/dist/esm/cli/get/config.js +0 -19
- package/dist/esm/cli/get/data.js +0 -143
- package/dist/esm/cli/get/index.js +0 -38
- package/dist/esm/cli/index.js +0 -23
- package/dist/esm/cli/is/config.js +0 -70
- package/dist/esm/cli/is/env.js +0 -22
- package/dist/esm/cli/is/index.js +0 -4
- package/dist/esm/cli/is/project.js +0 -146
- package/dist/esm/cli/is/type.js +0 -39
- package/dist/esm/cli/logger.js +0 -5
- package/dist/esm/cli/monorepo.js +0 -82
- package/dist/esm/cli/package.js +0 -203
- package/dist/esm/cli/path.js +0 -66
- package/dist/esm/cli/port.js +0 -97
- package/dist/esm/cli/prettyInstructions.js +0 -102
- package/dist/esm/cli/require.js +0 -235
- package/dist/esm/cli/route.js +0 -64
- package/dist/esm/cli/runtimeExports.js +0 -44
- package/dist/esm/cli/version.js +0 -26
- package/dist/esm/cli/watch.js +0 -112
- package/dist/esm/compiled.js +0 -66
- package/dist/esm/import.js +0 -11
- package/dist/esm/index.js +0 -3
- package/dist/esm/universal/constants.js +0 -32
- package/dist/esm/universal/formatWebpack.js +0 -95
- package/dist/esm/universal/index.js +0 -4
- package/dist/esm/universal/path.js +0 -6
- package/dist/esm/universal/pluginDagSort.js +0 -73
- package/dist/esm-node/cli/action.js +0 -30
- package/dist/esm-node/cli/alias.js +0 -40
- package/dist/esm-node/cli/applyOptionsChain.js +0 -27
- package/dist/esm-node/cli/babel.js +0 -107
- package/dist/esm-node/cli/commands.js +0 -39
- package/dist/esm-node/cli/common.js +0 -15
- package/dist/esm-node/cli/config.js +0 -9
- package/dist/esm-node/cli/constants.js +0 -114
- package/dist/esm-node/cli/ensure.js +0 -14
- package/dist/esm-node/cli/fs.js +0 -18
- package/dist/esm-node/cli/get/config.js +0 -19
- package/dist/esm-node/cli/get/data.js +0 -96
- package/dist/esm-node/cli/get/index.js +0 -22
- package/dist/esm-node/cli/is/config.js +0 -50
- package/dist/esm-node/cli/is/env.js +0 -12
- package/dist/esm-node/cli/is/project.js +0 -105
- package/dist/esm-node/cli/is/type.js +0 -36
- package/dist/esm-node/cli/logger.js +0 -5
- package/dist/esm-node/cli/monorepo.js +0 -67
- package/dist/esm-node/cli/package.js +0 -66
- package/dist/esm-node/cli/path.js +0 -48
- package/dist/esm-node/cli/port.js +0 -48
- package/dist/esm-node/cli/prettyInstructions.js +0 -90
- package/dist/esm-node/cli/require.js +0 -111
- package/dist/esm-node/cli/route.js +0 -60
- package/dist/esm-node/cli/runtimeExports.js +0 -38
- package/dist/esm-node/cli/version.js +0 -26
- package/dist/esm-node/cli/watch.js +0 -45
- package/dist/esm-node/compiled.js +0 -66
- package/dist/esm-node/import.js +0 -11
- package/dist/esm-node/universal/constants.js +0 -32
- package/dist/esm-node/universal/formatWebpack.js +0 -102
- package/dist/esm-node/universal/path.js +0 -6
- package/dist/esm-node/universal/pluginDagSort.js +0 -50
- package/dist/types/cli/action.d.ts +0 -2
- package/dist/types/universal/formatWebpack.d.ts +0 -26
- /package/dist/{esm-node/cli/is/index.js → esm/cli/is/index.mjs} +0 -0
- /package/dist/{esm-node/index.js → esm/index.mjs} +0 -0
|
@@ -1 +1,1738 @@
|
|
|
1
|
-
(()=>{var e={328:(e,t,n)=>{"use strict";const r=n(81);const o=n(529);const s=n(170);function spawn(e,t,n){const i=o(e,t,n);const a=r.spawn(i.command,i.args,i.options);s.hookChildProcess(a,i);return a}function spawnSync(e,t,n){const i=o(e,t,n);const a=r.spawnSync(i.command,i.args,i.options);a.error=a.error||s.verifyENOENTSync(a.status,i);return a}e.exports=spawn;e.exports.spawn=spawn;e.exports.sync=spawnSync;e.exports._parse=o;e.exports._enoent=s},170:e=>{"use strict";const t=process.platform==="win32";function notFoundError(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function hookChildProcess(e,n){if(!t){return}const r=e.emit;e.emit=function(t,o){if(t==="exit"){const t=verifyENOENT(o,n,"spawn");if(t){return r.call(e,"error",t)}}return r.apply(e,arguments)}}function verifyENOENT(e,n){if(t&&e===1&&!n.file){return notFoundError(n.original,"spawn")}return null}function verifyENOENTSync(e,n){if(t&&e===1&&!n.file){return notFoundError(n.original,"spawnSync")}return null}e.exports={hookChildProcess:hookChildProcess,verifyENOENT:verifyENOENT,verifyENOENTSync:verifyENOENTSync,notFoundError:notFoundError}},529:(e,t,n)=>{"use strict";const r=n(17);const o=n(499);const s=n(24);const i=n(91);const a=process.platform==="win32";const c=/\.(?:com|exe)$/i;const d=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function detectShebang(e){e.file=o(e);const t=e.file&&i(e.file);if(t){e.args.unshift(e.file);e.command=t;return o(e)}return e.file}function parseNonShell(e){if(!a){return e}const t=detectShebang(e);const n=!c.test(t);if(e.options.forceShell||n){const n=d.test(t);e.command=r.normalize(e.command);e.command=s.command(e.command);e.args=e.args.map((e=>s.argument(e,n)));const o=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${o}"`];e.command=process.env.comspec||"cmd.exe";e.options.windowsVerbatimArguments=true}return e}function parse(e,t,n){if(t&&!Array.isArray(t)){n=t;t=null}t=t?t.slice(0):[];n=Object.assign({},n);const r={command:e,args:t,options:n,file:undefined,original:{command:e,args:t}};return n.shell?r:parseNonShell(r)}e.exports=parse},24:e=>{"use strict";const t=/([()\][%!^"`<>&|;, *?])/g;function escapeCommand(e){e=e.replace(t,"^$1");return e}function escapeArgument(e,n){e=`${e}`;e=e.replace(/(\\*)"/g,'$1$1\\"');e=e.replace(/(\\*)$/,"$1$1");e=`"${e}"`;e=e.replace(t,"^$1");if(n){e=e.replace(t,"^$1")}return e}e.exports.command=escapeCommand;e.exports.argument=escapeArgument},91:(e,t,n)=>{"use strict";const r=n(147);const o=n(256);function readShebang(e){const t=150;const n=Buffer.alloc(t);let s;try{s=r.openSync(e,"r");r.readSync(s,n,0,t,0);r.closeSync(s)}catch(e){}return o(n.toString())}e.exports=readShebang},499:(e,t,n)=>{"use strict";const r=n(17);const o=n(85);const s=n(460);function resolveCommandAttempt(e,t){const n=e.options.env||process.env;const i=process.cwd();const a=e.options.cwd!=null;const c=a&&process.chdir!==undefined&&!process.chdir.disabled;if(c){try{process.chdir(e.options.cwd)}catch(e){}}let d;try{d=o.sync(e.command,{path:n[s({env:n})],pathExt:t?r.delimiter:undefined})}catch(e){}finally{if(c){process.chdir(i)}}if(d){d=r.resolve(a?e.options.cwd:"",d)}return d}function resolveCommand(e){return resolveCommandAttempt(e)||resolveCommandAttempt(e,true)}e.exports=resolveCommand},632:(e,t,n)=>{"use strict";const r=n(17);const o=n(81);const s=n(328);const i=n(133);const a=n(136);const c=n(591);const d=n(324);const u=n(166);const{spawnedKill:l,spawnedCancel:f,setupTimeout:p,validateTimeout:m,setExitHandler:g}=n(878);const{handleInput:x,getSpawnedResult:h,makeAllStream:y,validateInputSync:b}=n(533);const{mergePromise:S,getSpawnedPromise:v}=n(210);const{joinCommand:w,parseCommand:E,getEscapedCommand:I}=n(192);const T=1e3*1e3*100;const getEnv=({env:e,extendEnv:t,preferLocal:n,localDir:r,execPath:o})=>{const s=t?{...process.env,...e}:e;if(n){return a.env({env:s,cwd:r,execPath:o})}return s};const handleArguments=(e,t,n={})=>{const o=s._parse(e,t,n);e=o.command;t=o.args;n=o.options;n={maxBuffer:T,buffer:true,stripFinalNewline:true,extendEnv:true,preferLocal:false,localDir:n.cwd||process.cwd(),execPath:process.execPath,encoding:"utf8",reject:true,cleanup:true,all:false,windowsHide:true,...n};n.env=getEnv(n);n.stdio=u(n);if(process.platform==="win32"&&r.basename(e,".exe")==="cmd"){t.unshift("/q")}return{file:e,args:t,options:n,parsed:o}};const handleOutput=(e,t,n)=>{if(typeof t!=="string"&&!Buffer.isBuffer(t)){return n===undefined?undefined:""}if(e.stripFinalNewline){return i(t)}return t};const execa=(e,t,n)=>{const r=handleArguments(e,t,n);const s=w(e,t);const i=I(e,t);m(r.options);let a;try{a=o.spawn(r.file,r.args,r.options)}catch(e){const t=new o.ChildProcess;const n=Promise.reject(d({error:e,stdout:"",stderr:"",all:"",command:s,escapedCommand:i,parsed:r,timedOut:false,isCanceled:false,killed:false}));return S(t,n)}const u=v(a);const b=p(a,r.options,u);const E=g(a,r.options,b);const T={isCanceled:false};a.kill=l.bind(null,a.kill.bind(a));a.cancel=f.bind(null,a,T);const handlePromise=async()=>{const[{error:e,exitCode:t,signal:n,timedOut:o},c,u,l]=await h(a,r.options,E);const f=handleOutput(r.options,c);const p=handleOutput(r.options,u);const m=handleOutput(r.options,l);if(e||t!==0||n!==null){const c=d({error:e,exitCode:t,signal:n,stdout:f,stderr:p,all:m,command:s,escapedCommand:i,parsed:r,timedOut:o,isCanceled:T.isCanceled,killed:a.killed});if(!r.options.reject){return c}throw c}return{command:s,escapedCommand:i,exitCode:0,stdout:f,stderr:p,all:m,failed:false,timedOut:false,isCanceled:false,killed:false}};const C=c(handlePromise);x(a,r.options.input);a.all=y(a,r.options);return S(a,C)};e.exports=execa;e.exports.sync=(e,t,n)=>{const r=handleArguments(e,t,n);const s=w(e,t);const i=I(e,t);b(r.options);let a;try{a=o.spawnSync(r.file,r.args,r.options)}catch(e){throw d({error:e,stdout:"",stderr:"",all:"",command:s,escapedCommand:i,parsed:r,timedOut:false,isCanceled:false,killed:false})}const c=handleOutput(r.options,a.stdout,a.error);const u=handleOutput(r.options,a.stderr,a.error);if(a.error||a.status!==0||a.signal!==null){const e=d({stdout:c,stderr:u,error:a.error,signal:a.signal,exitCode:a.status,command:s,escapedCommand:i,parsed:r,timedOut:a.error&&a.error.code==="ETIMEDOUT",isCanceled:false,killed:a.signal!==null});if(!r.options.reject){return e}throw e}return{command:s,escapedCommand:i,exitCode:0,stdout:c,stderr:u,failed:false,timedOut:false,isCanceled:false,killed:false}};e.exports.command=(e,t)=>{const[n,...r]=E(e);return execa(n,r,t)};e.exports.commandSync=(e,t)=>{const[n,...r]=E(e);return execa.sync(n,r,t)};e.exports.node=(e,t,n={})=>{if(t&&!Array.isArray(t)&&typeof t==="object"){n=t;t=[]}const r=u.node(n);const o=process.execArgv.filter((e=>!e.startsWith("--inspect")));const{nodePath:s=process.execPath,nodeOptions:i=o}=n;return execa(s,[...i,e,...Array.isArray(t)?t:[]],{...n,stdin:undefined,stdout:undefined,stderr:undefined,stdio:r,shell:false})}},192:e=>{"use strict";const normalizeArgs=(e,t=[])=>{if(!Array.isArray(t)){return[e]}return[e,...t]};const t=/^[\w.-]+$/;const n=/"/g;const escapeArg=e=>{if(typeof e!=="string"||t.test(e)){return e}return`"${e.replace(n,'\\"')}"`};const joinCommand=(e,t)=>normalizeArgs(e,t).join(" ");const getEscapedCommand=(e,t)=>normalizeArgs(e,t).map((e=>escapeArg(e))).join(" ");const r=/ +/g;const parseCommand=e=>{const t=[];for(const n of e.trim().split(r)){const e=t[t.length-1];if(e&&e.endsWith("\\")){t[t.length-1]=`${e.slice(0,-1)} ${n}`}else{t.push(n)}}return t};e.exports={joinCommand:joinCommand,getEscapedCommand:getEscapedCommand,parseCommand:parseCommand}},324:(e,t,n)=>{"use strict";const{signalsByName:r}=n(882);const getErrorPrefix=({timedOut:e,timeout:t,errorCode:n,signal:r,signalDescription:o,exitCode:s,isCanceled:i})=>{if(e){return`timed out after ${t} milliseconds`}if(i){return"was canceled"}if(n!==undefined){return`failed with ${n}`}if(r!==undefined){return`was killed with ${r} (${o})`}if(s!==undefined){return`failed with exit code ${s}`}return"failed"};const makeError=({stdout:e,stderr:t,all:n,error:o,signal:s,exitCode:i,command:a,escapedCommand:c,timedOut:d,isCanceled:u,killed:l,parsed:{options:{timeout:f}}})=>{i=i===null?undefined:i;s=s===null?undefined:s;const p=s===undefined?undefined:r[s].description;const m=o&&o.code;const g=getErrorPrefix({timedOut:d,timeout:f,errorCode:m,signal:s,signalDescription:p,exitCode:i,isCanceled:u});const x=`Command ${g}: ${a}`;const h=Object.prototype.toString.call(o)==="[object Error]";const y=h?`${x}\n${o.message}`:x;const b=[y,t,e].filter(Boolean).join("\n");if(h){o.originalMessage=o.message;o.message=b}else{o=new Error(b)}o.shortMessage=y;o.command=a;o.escapedCommand=c;o.exitCode=i;o.signal=s;o.signalDescription=p;o.stdout=e;o.stderr=t;if(n!==undefined){o.all=n}if("bufferedData"in o){delete o.bufferedData}o.failed=true;o.timedOut=Boolean(d);o.isCanceled=u;o.killed=l&&!d;return o};e.exports=makeError},878:(e,t,n)=>{"use strict";const r=n(37);const o=n(580);const s=1e3*5;const spawnedKill=(e,t="SIGTERM",n={})=>{const r=e(t);setKillTimeout(e,t,n,r);return r};const setKillTimeout=(e,t,n,r)=>{if(!shouldForceKill(t,n,r)){return}const o=getForceKillAfterTimeout(n);const s=setTimeout((()=>{e("SIGKILL")}),o);if(s.unref){s.unref()}};const shouldForceKill=(e,{forceKillAfterTimeout:t},n)=>isSigterm(e)&&t!==false&&n;const isSigterm=e=>e===r.constants.signals.SIGTERM||typeof e==="string"&&e.toUpperCase()==="SIGTERM";const getForceKillAfterTimeout=({forceKillAfterTimeout:e=true})=>{if(e===true){return s}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 spawnedCancel=(e,t)=>{const n=e.kill();if(n){t.isCanceled=true}};const timeoutKill=(e,t,n)=>{e.kill(t);n(Object.assign(new Error("Timed out"),{timedOut:true,signal:t}))};const setupTimeout=(e,{timeout:t,killSignal:n="SIGTERM"},r)=>{if(t===0||t===undefined){return r}let o;const s=new Promise(((r,s)=>{o=setTimeout((()=>{timeoutKill(e,n,s)}),t)}));const i=r.finally((()=>{clearTimeout(o)}));return Promise.race([s,i])};const validateTimeout=({timeout:e})=>{if(e!==undefined&&(!Number.isFinite(e)||e<0)){throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)}};const setExitHandler=async(e,{cleanup:t,detached:n},r)=>{if(!t||n){return r}const s=o((()=>{e.kill()}));return r.finally((()=>{s()}))};e.exports={spawnedKill:spawnedKill,spawnedCancel:spawnedCancel,setupTimeout:setupTimeout,validateTimeout:validateTimeout,setExitHandler:setExitHandler}},210:e=>{"use strict";const t=(async()=>{})().constructor.prototype;const n=["then","catch","finally"].map((e=>[e,Reflect.getOwnPropertyDescriptor(t,e)]));const mergePromise=(e,t)=>{for(const[r,o]of n){const n=typeof t==="function"?(...e)=>Reflect.apply(o.value,t(),e):o.value.bind(t);Reflect.defineProperty(e,r,{...o,value:n})}return e};const getSpawnedPromise=e=>new Promise(((t,n)=>{e.on("exit",((e,n)=>{t({exitCode:e,signal:n})}));e.on("error",(e=>{n(e)}));if(e.stdin){e.stdin.on("error",(e=>{n(e)}))}}));e.exports={mergePromise:mergePromise,getSpawnedPromise:getSpawnedPromise}},166:e=>{"use strict";const t=["stdin","stdout","stderr"];const hasAlias=e=>t.some((t=>e[t]!==undefined));const normalizeStdio=e=>{if(!e){return}const{stdio:n}=e;if(n===undefined){return t.map((t=>e[t]))}if(hasAlias(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 r=Math.max(n.length,t.length);return Array.from({length:r},((e,t)=>n[t]))};e.exports=normalizeStdio;e.exports.node=e=>{const t=normalizeStdio(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"]}},533:(e,t,n)=>{"use strict";const r=n(434);const o=n(981);const s=n(853);const handleInput=(e,t)=>{if(t===undefined||e.stdin===undefined){return}if(r(t)){t.pipe(e.stdin)}else{e.stdin.end(t)}};const makeAllStream=(e,{all:t})=>{if(!t||!e.stdout&&!e.stderr){return}const n=s();if(e.stdout){n.add(e.stdout)}if(e.stderr){n.add(e.stderr)}return n};const getBufferedData=async(e,t)=>{if(!e){return}e.destroy();try{return await t}catch(e){return e.bufferedData}};const getStreamPromise=(e,{encoding:t,buffer:n,maxBuffer:r})=>{if(!e||!n){return}if(t){return o(e,{encoding:t,maxBuffer:r})}return o.buffer(e,{maxBuffer:r})};const getSpawnedResult=async({stdout:e,stderr:t,all:n},{encoding:r,buffer:o,maxBuffer:s},i)=>{const a=getStreamPromise(e,{encoding:r,buffer:o,maxBuffer:s});const c=getStreamPromise(t,{encoding:r,buffer:o,maxBuffer:s});const d=getStreamPromise(n,{encoding:r,buffer:o,maxBuffer:s*2});try{return await Promise.all([i,a,c,d])}catch(r){return Promise.all([{error:r,signal:r.signal,timedOut:r.timedOut},getBufferedData(e,a),getBufferedData(t,c),getBufferedData(n,d)])}};const validateInputSync=({input:e})=>{if(r(e)){throw new TypeError("The `input` option cannot be a stream in sync mode")}};e.exports={handleInput:handleInput,makeAllStream:makeAllStream,getSpawnedResult:getSpawnedResult,validateInputSync:validateInputSync}},782:(e,t,n)=>{"use strict";const{PassThrough:r}=n(781);e.exports=e=>{e={...e};const{array:t}=e;let{encoding:n}=e;const o=n==="buffer";let s=false;if(t){s=!(n||o)}else{n=n||"utf8"}if(o){n=null}const i=new r({objectMode:s});if(n){i.setEncoding(n)}let a=0;const c=[];i.on("data",(e=>{c.push(e);if(s){a=c.length}else{a+=e.length}}));i.getBufferedValue=()=>{if(t){return c}return o?Buffer.concat(c,a):c.join("")};i.getBufferedLength=()=>a;return i}},981:(e,t,n)=>{"use strict";const{constants:r}=n(300);const o=n(781);const{promisify:s}=n(837);const i=n(782);const a=s(o.pipeline);class MaxBufferError extends Error{constructor(){super("maxBuffer exceeded");this.name="MaxBufferError"}}async function getStream(e,t){if(!e){throw new Error("Expected a stream")}t={maxBuffer:Infinity,...t};const{maxBuffer:n}=t;const o=i(t);await new Promise(((t,s)=>{const rejectPromise=e=>{if(e&&o.getBufferedLength()<=r.MAX_LENGTH){e.bufferedData=o.getBufferedValue()}s(e)};(async()=>{try{await a(e,o);t()}catch(e){rejectPromise(e)}})();o.on("data",(()=>{if(o.getBufferedLength()>n){rejectPromise(new MaxBufferError)}}))}));return o.getBufferedValue()}e.exports=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},221:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.SIGNALS=void 0;const n=[{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=n},882:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.signalsByNumber=t.signalsByName=void 0;var r=n(37);var o=n(922);var s=n(840);const getSignalsByName=function(){const e=(0,o.getSignals)();return e.reduce(getSignalByName,{})};const getSignalByName=function(e,{name:t,number:n,description:r,supported:o,action:s,forced:i,standard:a}){return{...e,[t]:{name:t,number:n,description:r,supported:o,action:s,forced:i,standard:a}}};const i=getSignalsByName();t.signalsByName=i;const getSignalsByNumber=function(){const e=(0,o.getSignals)();const t=s.SIGRTMAX+1;const n=Array.from({length:t},((t,n)=>getSignalByNumber(n,e)));return Object.assign({},...n)};const getSignalByNumber=function(e,t){const n=findSignalByNumber(e,t);if(n===undefined){return{}}const{name:r,description:o,supported:s,action:i,forced:a,standard:c}=n;return{[e]:{name:r,number:e,description:o,supported:s,action:i,forced:a,standard:c}}};const findSignalByNumber=function(e,t){const n=t.find((({name:t})=>r.constants.signals[t]===e));if(n!==undefined){return n}return t.find((t=>t.number===e))};const a=getSignalsByNumber();t.signalsByNumber=a},840:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.SIGRTMAX=t.getRealtimeSignals=void 0;const getRealtimeSignals=function(){const e=r-n+1;return Array.from({length:e},getRealtimeSignal)};t.getRealtimeSignals=getRealtimeSignals;const getRealtimeSignal=function(e,t){return{name:`SIGRT${t+1}`,number:n+t,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}};const n=34;const r=64;t.SIGRTMAX=r},922:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.getSignals=void 0;var r=n(37);var o=n(221);var s=n(840);const getSignals=function(){const e=(0,s.getRealtimeSignals)();const t=[...o.SIGNALS,...e].map(normalizeSignal);return t};t.getSignals=getSignals;const normalizeSignal=function({name:e,number:t,description:n,action:o,forced:s=false,standard:i}){const{signals:{[e]:a}}=r.constants;const c=a!==undefined;const d=c?a:t;return{name:e,number:d,description:n,supported:c,action:o,forced:s,standard:i}}},434:e=>{"use strict";const isStream=e=>e!==null&&typeof e==="object"&&typeof e.pipe==="function";isStream.writable=e=>isStream(e)&&e.writable!==false&&typeof e._write==="function"&&typeof e._writableState==="object";isStream.readable=e=>isStream(e)&&e.readable!==false&&typeof e._read==="function"&&typeof e._readableState==="object";isStream.duplex=e=>isStream.writable(e)&&isStream.readable(e);isStream.transform=e=>isStream.duplex(e)&&typeof e._transform==="function";e.exports=isStream},212:(e,t,n)=>{var r=n(147);var o;if(process.platform==="win32"||global.TESTING_WINDOWS){o=n(476)}else{o=n(836)}e.exports=isexe;isexe.sync=sync;function isexe(e,t,n){if(typeof t==="function"){n=t;t={}}if(!n){if(typeof Promise!=="function"){throw new TypeError("callback not provided")}return new Promise((function(n,r){isexe(e,t||{},(function(e,t){if(e){r(e)}else{n(t)}}))}))}o(e,t||{},(function(e,r){if(e){if(e.code==="EACCES"||t&&t.ignoreErrors){e=null;r=false}}n(e,r)}))}function sync(e,t){try{return o.sync(e,t||{})}catch(e){if(t&&t.ignoreErrors||e.code==="EACCES"){return false}else{throw e}}}},836:(e,t,n)=>{e.exports=isexe;isexe.sync=sync;var r=n(147);function isexe(e,t,n){r.stat(e,(function(e,r){n(e,e?false:checkStat(r,t))}))}function sync(e,t){return checkStat(r.statSync(e),t)}function checkStat(e,t){return e.isFile()&&checkMode(e,t)}function checkMode(e,t){var n=e.mode;var r=e.uid;var o=e.gid;var s=t.uid!==undefined?t.uid:process.getuid&&process.getuid();var i=t.gid!==undefined?t.gid:process.getgid&&process.getgid();var a=parseInt("100",8);var c=parseInt("010",8);var d=parseInt("001",8);var u=a|c;var l=n&d||n&c&&o===i||n&a&&r===s||n&u&&s===0;return l}},476:(e,t,n)=>{e.exports=isexe;isexe.sync=sync;var r=n(147);function checkPathExt(e,t){var n=t.pathExt!==undefined?t.pathExt:process.env.PATHEXT;if(!n){return true}n=n.split(";");if(n.indexOf("")!==-1){return true}for(var r=0;r<n.length;r++){var o=n[r].toLowerCase();if(o&&e.substr(-o.length).toLowerCase()===o){return true}}return false}function checkStat(e,t,n){if(!e.isSymbolicLink()&&!e.isFile()){return false}return checkPathExt(t,n)}function isexe(e,t,n){r.stat(e,(function(r,o){n(r,r?false:checkStat(o,e,t))}))}function sync(e,t){return checkStat(r.statSync(e),e,t)}},853:(e,t,n)=>{"use strict";const{PassThrough:r}=n(781);e.exports=function(){var e=[];var t=new r({objectMode:true});t.setMaxListeners(0);t.add=add;t.isEmpty=isEmpty;t.on("unpipe",remove);Array.prototype.slice.call(arguments).forEach(add);return t;function add(n){if(Array.isArray(n)){n.forEach(add);return this}e.push(n);n.once("end",remove.bind(null,n));n.once("error",t.emit.bind(t,"error"));n.pipe(t,{end:false});return this}function isEmpty(){return e.length==0}function remove(n){e=e.filter((function(e){return e!==n}));if(!e.length&&t.readable){t.end()}}}},693:e=>{"use strict";const mimicFn=(e,t)=>{for(const n of Reflect.ownKeys(t)){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}return e};e.exports=mimicFn;e.exports["default"]=mimicFn},136:(e,t,n)=>{"use strict";const r=n(17);const o=n(460);const npmRunPath=e=>{e={cwd:process.cwd(),path:process.env[o()],execPath:process.execPath,...e};let t;let n=r.resolve(e.cwd);const s=[];while(t!==n){s.push(r.join(n,"node_modules/.bin"));t=n;n=r.resolve(n,"..")}const i=r.resolve(e.cwd,e.execPath,"..");s.push(i);return s.concat(e.path).join(r.delimiter)};e.exports=npmRunPath;e.exports["default"]=npmRunPath;e.exports.env=t=>{t={env:process.env,...t};const n={...t.env};const r=o({env:n});t.path=n[r];n[r]=e.exports(t);return n}},591:(e,t,n)=>{"use strict";const r=n(693);const o=new WeakMap;const onetime=(e,t={})=>{if(typeof e!=="function"){throw new TypeError("Expected a function")}let n;let s=0;const i=e.displayName||e.name||"<anonymous>";const onetime=function(...r){o.set(onetime,++s);if(s===1){n=e.apply(this,r);e=null}else if(t.throw===true){throw new Error(`Function \`${i}\` can only be called once`)}return n};r(onetime,e);o.set(onetime,s);return onetime};e.exports=onetime;e.exports["default"]=onetime;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)}},460:e=>{"use strict";const pathKey=(e={})=>{const t=e.env||process.env;const n=e.platform||process.platform;if(n!=="win32"){return"PATH"}return Object.keys(t).reverse().find((e=>e.toUpperCase()==="PATH"))||"Path"};e.exports=pathKey;e.exports["default"]=pathKey},256:(e,t,n)=>{"use strict";const r=n(609);e.exports=(e="")=>{const t=e.match(r);if(!t){return null}const[n,o]=t[0].replace(/#! ?/,"").split(" ");const s=n.split("/").pop();if(s==="env"){return o}return o?`${s} ${o}`:s}},609:e=>{"use strict";e.exports=/^#!(.*)/},580:(e,t,n)=>{var r=global.process;const processOk=function(e){return e&&typeof e==="object"&&typeof e.removeListener==="function"&&typeof e.emit==="function"&&typeof e.reallyExit==="function"&&typeof e.listeners==="function"&&typeof e.kill==="function"&&typeof e.pid==="number"&&typeof e.on==="function"};if(!processOk(r)){e.exports=function(){return function(){}}}else{var o=n(491);var s=n(357);var i=/^win/i.test(r.platform);var a=n(361);if(typeof a!=="function"){a=a.EventEmitter}var c;if(r.__signal_exit_emitter__){c=r.__signal_exit_emitter__}else{c=r.__signal_exit_emitter__=new a;c.count=0;c.emitted={}}if(!c.infinite){c.setMaxListeners(Infinity);c.infinite=true}e.exports=function(e,t){if(!processOk(global.process)){return function(){}}o.equal(typeof e,"function","a callback must be provided for exit handler");if(f===false){p()}var n="exit";if(t&&t.alwaysLast){n="afterexit"}var remove=function(){c.removeListener(n,e);if(c.listeners("exit").length===0&&c.listeners("afterexit").length===0){d()}};c.on(n,e);return remove};var d=function unload(){if(!f||!processOk(global.process)){return}f=false;s.forEach((function(e){try{r.removeListener(e,l[e])}catch(e){}}));r.emit=x;r.reallyExit=m;c.count-=1};e.exports.unload=d;var u=function emit(e,t,n){if(c.emitted[e]){return}c.emitted[e]=true;c.emit(e,t,n)};var l={};s.forEach((function(e){l[e]=function listener(){if(!processOk(global.process)){return}var t=r.listeners(e);if(t.length===c.count){d();u("exit",null,e);u("afterexit",null,e);if(i&&e==="SIGHUP"){e="SIGINT"}r.kill(r.pid,e)}}}));e.exports.signals=function(){return s};var f=false;var p=function load(){if(f||!processOk(global.process)){return}f=true;c.count+=1;s=s.filter((function(e){try{r.on(e,l[e]);return true}catch(e){return false}}));r.emit=h;r.reallyExit=g};e.exports.load=p;var m=r.reallyExit;var g=function processReallyExit(e){if(!processOk(global.process)){return}r.exitCode=e||0;u("exit",r.exitCode,null);u("afterexit",r.exitCode,null);m.call(r,r.exitCode)};var x=r.emit;var h=function processEmit(e,t){if(e==="exit"&&processOk(global.process)){if(t!==undefined){r.exitCode=t}var n=x.apply(this,arguments);u("exit",r.exitCode,null);u("afterexit",r.exitCode,null);return n}else{return x.apply(this,arguments)}}}},357: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")}},133:e=>{"use strict";e.exports=e=>{const t=typeof e==="string"?"\n":"\n".charCodeAt();const n=typeof e==="string"?"\r":"\r".charCodeAt();if(e[e.length-1]===t){e=e.slice(0,e.length-1)}if(e[e.length-1]===n){e=e.slice(0,e.length-1)}return e}},85:(e,t,n)=>{const r=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys";const o=n(17);const s=r?";":":";const i=n(212);const getNotFoundError=e=>Object.assign(new Error(`not found: ${e}`),{code:"ENOENT"});const getPathInfo=(e,t)=>{const n=t.colon||s;const o=e.match(/\//)||r&&e.match(/\\/)?[""]:[...r?[process.cwd()]:[],...(t.path||process.env.PATH||"").split(n)];const i=r?t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"";const a=r?i.split(n):[""];if(r){if(e.indexOf(".")!==-1&&a[0]!=="")a.unshift("")}return{pathEnv:o,pathExt:a,pathExtExe:i}};const which=(e,t,n)=>{if(typeof t==="function"){n=t;t={}}if(!t)t={};const{pathEnv:r,pathExt:s,pathExtExe:a}=getPathInfo(e,t);const c=[];const step=n=>new Promise(((s,i)=>{if(n===r.length)return t.all&&c.length?s(c):i(getNotFoundError(e));const a=r[n];const d=/^".*"$/.test(a)?a.slice(1,-1):a;const u=o.join(d,e);const l=!d&&/^\.[\\\/]/.test(e)?e.slice(0,2)+u:u;s(subStep(l,n,0))}));const subStep=(e,n,r)=>new Promise(((o,d)=>{if(r===s.length)return o(step(n+1));const u=s[r];i(e+u,{pathExt:a},((s,i)=>{if(!s&&i){if(t.all)c.push(e+u);else return o(e+u)}return o(subStep(e,n,r+1))}))}));return n?step(0).then((e=>n(null,e)),n):step(0)};const whichSync=(e,t)=>{t=t||{};const{pathEnv:n,pathExt:r,pathExtExe:s}=getPathInfo(e,t);const a=[];for(let c=0;c<n.length;c++){const d=n[c];const u=/^".*"$/.test(d)?d.slice(1,-1):d;const l=o.join(u,e);const f=!u&&/^\.[\\\/]/.test(e)?e.slice(0,2)+l:l;for(let e=0;e<r.length;e++){const n=f+r[e];try{const e=i.sync(n,{pathExt:s});if(e){if(t.all)a.push(n);else return n}}catch(e){}}}if(t.all&&a.length)return a;if(t.nothrow)return null;throw getNotFoundError(e)};e.exports=which;which.sync=whichSync},491:e=>{"use strict";e.exports=require("assert")},300:e=>{"use strict";e.exports=require("buffer")},81:e=>{"use strict";e.exports=require("child_process")},361:e=>{"use strict";e.exports=require("events")},147:e=>{"use strict";e.exports=require("fs")},37:e=>{"use strict";e.exports=require("os")},17:e=>{"use strict";e.exports=require("path")},781:e=>{"use strict";e.exports=require("stream")},837:e=>{"use strict";e.exports=require("util")}};var t={};function __nccwpck_require__(n){var r=t[n];if(r!==undefined){return r.exports}var o=t[n]={exports:{}};var s=true;try{e[n](o,o.exports,__nccwpck_require__);s=false}finally{if(s)delete t[n]}return o.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var n=__nccwpck_require__(632);module.exports=n})();
|
|
1
|
+
(()=>{
|
|
2
|
+
var e = {
|
|
3
|
+
328: (e, t, n)=>{
|
|
4
|
+
"use strict";
|
|
5
|
+
const r = n(81);
|
|
6
|
+
const o = n(529);
|
|
7
|
+
const s = n(170);
|
|
8
|
+
function spawn(e, t, n) {
|
|
9
|
+
const i = o(e, t, n);
|
|
10
|
+
const a = r.spawn(i.command, i.args, i.options);
|
|
11
|
+
s.hookChildProcess(a, i);
|
|
12
|
+
return a;
|
|
13
|
+
}
|
|
14
|
+
function spawnSync(e, t, n) {
|
|
15
|
+
const i = o(e, t, n);
|
|
16
|
+
const a = r.spawnSync(i.command, i.args, i.options);
|
|
17
|
+
a.error = a.error || s.verifyENOENTSync(a.status, i);
|
|
18
|
+
return a;
|
|
19
|
+
}
|
|
20
|
+
e.exports = spawn;
|
|
21
|
+
e.exports.spawn = spawn;
|
|
22
|
+
e.exports.sync = spawnSync;
|
|
23
|
+
e.exports._parse = o;
|
|
24
|
+
e.exports._enoent = s;
|
|
25
|
+
},
|
|
26
|
+
170: (e)=>{
|
|
27
|
+
"use strict";
|
|
28
|
+
const t = "win32" === process.platform;
|
|
29
|
+
function notFoundError(e, t) {
|
|
30
|
+
return Object.assign(new Error(`${t} ${e.command} ENOENT`), {
|
|
31
|
+
code: "ENOENT",
|
|
32
|
+
errno: "ENOENT",
|
|
33
|
+
syscall: `${t} ${e.command}`,
|
|
34
|
+
path: e.command,
|
|
35
|
+
spawnargs: e.args
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
function hookChildProcess(e, n) {
|
|
39
|
+
if (!t) return;
|
|
40
|
+
const r = e.emit;
|
|
41
|
+
e.emit = function(t, o) {
|
|
42
|
+
if ("exit" === t) {
|
|
43
|
+
const t = verifyENOENT(o, n, "spawn");
|
|
44
|
+
if (t) return r.call(e, "error", t);
|
|
45
|
+
}
|
|
46
|
+
return r.apply(e, arguments);
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
function verifyENOENT(e, n) {
|
|
50
|
+
if (t && 1 === e && !n.file) return notFoundError(n.original, "spawn");
|
|
51
|
+
return null;
|
|
52
|
+
}
|
|
53
|
+
function verifyENOENTSync(e, n) {
|
|
54
|
+
if (t && 1 === e && !n.file) return notFoundError(n.original, "spawnSync");
|
|
55
|
+
return null;
|
|
56
|
+
}
|
|
57
|
+
e.exports = {
|
|
58
|
+
hookChildProcess: hookChildProcess,
|
|
59
|
+
verifyENOENT: verifyENOENT,
|
|
60
|
+
verifyENOENTSync: verifyENOENTSync,
|
|
61
|
+
notFoundError: notFoundError
|
|
62
|
+
};
|
|
63
|
+
},
|
|
64
|
+
529: (e, t, n)=>{
|
|
65
|
+
"use strict";
|
|
66
|
+
const r = n(17);
|
|
67
|
+
const o = n(499);
|
|
68
|
+
const s = n(24);
|
|
69
|
+
const i = n(91);
|
|
70
|
+
const a = "win32" === process.platform;
|
|
71
|
+
const c = /\.(?:com|exe)$/i;
|
|
72
|
+
const d = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
|
|
73
|
+
function detectShebang(e) {
|
|
74
|
+
e.file = o(e);
|
|
75
|
+
const t = e.file && i(e.file);
|
|
76
|
+
if (t) {
|
|
77
|
+
e.args.unshift(e.file);
|
|
78
|
+
e.command = t;
|
|
79
|
+
return o(e);
|
|
80
|
+
}
|
|
81
|
+
return e.file;
|
|
82
|
+
}
|
|
83
|
+
function parseNonShell(e) {
|
|
84
|
+
if (!a) return e;
|
|
85
|
+
const t = detectShebang(e);
|
|
86
|
+
const n = !c.test(t);
|
|
87
|
+
if (e.options.forceShell || n) {
|
|
88
|
+
const n = d.test(t);
|
|
89
|
+
e.command = r.normalize(e.command);
|
|
90
|
+
e.command = s.command(e.command);
|
|
91
|
+
e.args = e.args.map((e)=>s.argument(e, n));
|
|
92
|
+
const o = [
|
|
93
|
+
e.command
|
|
94
|
+
].concat(e.args).join(" ");
|
|
95
|
+
e.args = [
|
|
96
|
+
"/d",
|
|
97
|
+
"/s",
|
|
98
|
+
"/c",
|
|
99
|
+
`"${o}"`
|
|
100
|
+
];
|
|
101
|
+
e.command = process.env.comspec || "cmd.exe";
|
|
102
|
+
e.options.windowsVerbatimArguments = true;
|
|
103
|
+
}
|
|
104
|
+
return e;
|
|
105
|
+
}
|
|
106
|
+
function parse(e, t, n) {
|
|
107
|
+
if (t && !Array.isArray(t)) {
|
|
108
|
+
n = t;
|
|
109
|
+
t = null;
|
|
110
|
+
}
|
|
111
|
+
t = t ? t.slice(0) : [];
|
|
112
|
+
n = Object.assign({}, n);
|
|
113
|
+
const r = {
|
|
114
|
+
command: e,
|
|
115
|
+
args: t,
|
|
116
|
+
options: n,
|
|
117
|
+
file: void 0,
|
|
118
|
+
original: {
|
|
119
|
+
command: e,
|
|
120
|
+
args: t
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
return n.shell ? r : parseNonShell(r);
|
|
124
|
+
}
|
|
125
|
+
e.exports = parse;
|
|
126
|
+
},
|
|
127
|
+
24: (e)=>{
|
|
128
|
+
"use strict";
|
|
129
|
+
const t = /([()\][%!^"`<>&|;, *?])/g;
|
|
130
|
+
function escapeCommand(e) {
|
|
131
|
+
e = e.replace(t, "^$1");
|
|
132
|
+
return e;
|
|
133
|
+
}
|
|
134
|
+
function escapeArgument(e, n) {
|
|
135
|
+
e = `${e}`;
|
|
136
|
+
e = e.replace(/(\\*)"/g, '$1$1\\"');
|
|
137
|
+
e = e.replace(/(\\*)$/, "$1$1");
|
|
138
|
+
e = `"${e}"`;
|
|
139
|
+
e = e.replace(t, "^$1");
|
|
140
|
+
if (n) e = e.replace(t, "^$1");
|
|
141
|
+
return e;
|
|
142
|
+
}
|
|
143
|
+
e.exports.command = escapeCommand;
|
|
144
|
+
e.exports.argument = escapeArgument;
|
|
145
|
+
},
|
|
146
|
+
91: (e, t, n)=>{
|
|
147
|
+
"use strict";
|
|
148
|
+
const r = n(147);
|
|
149
|
+
const o = n(256);
|
|
150
|
+
function readShebang(e) {
|
|
151
|
+
const t = 150;
|
|
152
|
+
const n = Buffer.alloc(t);
|
|
153
|
+
let s;
|
|
154
|
+
try {
|
|
155
|
+
s = r.openSync(e, "r");
|
|
156
|
+
r.readSync(s, n, 0, t, 0);
|
|
157
|
+
r.closeSync(s);
|
|
158
|
+
} catch (e) {}
|
|
159
|
+
return o(n.toString());
|
|
160
|
+
}
|
|
161
|
+
e.exports = readShebang;
|
|
162
|
+
},
|
|
163
|
+
499: (e, t, n)=>{
|
|
164
|
+
"use strict";
|
|
165
|
+
const r = n(17);
|
|
166
|
+
const o = n(85);
|
|
167
|
+
const s = n(460);
|
|
168
|
+
function resolveCommandAttempt(e, t) {
|
|
169
|
+
const n = e.options.env || process.env;
|
|
170
|
+
const i = process.cwd();
|
|
171
|
+
const a = null != e.options.cwd;
|
|
172
|
+
const c = a && void 0 !== process.chdir && !process.chdir.disabled;
|
|
173
|
+
if (c) try {
|
|
174
|
+
process.chdir(e.options.cwd);
|
|
175
|
+
} catch (e) {}
|
|
176
|
+
let d;
|
|
177
|
+
try {
|
|
178
|
+
d = o.sync(e.command, {
|
|
179
|
+
path: n[s({
|
|
180
|
+
env: n
|
|
181
|
+
})],
|
|
182
|
+
pathExt: t ? r.delimiter : void 0
|
|
183
|
+
});
|
|
184
|
+
} catch (e) {} finally{
|
|
185
|
+
if (c) process.chdir(i);
|
|
186
|
+
}
|
|
187
|
+
if (d) d = r.resolve(a ? e.options.cwd : "", d);
|
|
188
|
+
return d;
|
|
189
|
+
}
|
|
190
|
+
function resolveCommand(e) {
|
|
191
|
+
return resolveCommandAttempt(e) || resolveCommandAttempt(e, true);
|
|
192
|
+
}
|
|
193
|
+
e.exports = resolveCommand;
|
|
194
|
+
},
|
|
195
|
+
632: (e, t, n)=>{
|
|
196
|
+
"use strict";
|
|
197
|
+
const r = n(17);
|
|
198
|
+
const o = n(81);
|
|
199
|
+
const s = n(328);
|
|
200
|
+
const i = n(133);
|
|
201
|
+
const a = n(136);
|
|
202
|
+
const c = n(591);
|
|
203
|
+
const d = n(324);
|
|
204
|
+
const u = n(166);
|
|
205
|
+
const { spawnedKill: l, spawnedCancel: f, setupTimeout: p, validateTimeout: m, setExitHandler: g } = n(878);
|
|
206
|
+
const { handleInput: x, getSpawnedResult: h, makeAllStream: y, validateInputSync: b } = n(533);
|
|
207
|
+
const { mergePromise: S, getSpawnedPromise: v } = n(210);
|
|
208
|
+
const { joinCommand: w, parseCommand: E, getEscapedCommand: I } = n(192);
|
|
209
|
+
const T = 100000000;
|
|
210
|
+
const getEnv = ({ env: e, extendEnv: t, preferLocal: n, localDir: r, execPath: o })=>{
|
|
211
|
+
const s = t ? {
|
|
212
|
+
...process.env,
|
|
213
|
+
...e
|
|
214
|
+
} : e;
|
|
215
|
+
if (n) return a.env({
|
|
216
|
+
env: s,
|
|
217
|
+
cwd: r,
|
|
218
|
+
execPath: o
|
|
219
|
+
});
|
|
220
|
+
return s;
|
|
221
|
+
};
|
|
222
|
+
const handleArguments = (e, t, n = {})=>{
|
|
223
|
+
const o = s._parse(e, t, n);
|
|
224
|
+
e = o.command;
|
|
225
|
+
t = o.args;
|
|
226
|
+
n = o.options;
|
|
227
|
+
n = {
|
|
228
|
+
maxBuffer: T,
|
|
229
|
+
buffer: true,
|
|
230
|
+
stripFinalNewline: true,
|
|
231
|
+
extendEnv: true,
|
|
232
|
+
preferLocal: false,
|
|
233
|
+
localDir: n.cwd || process.cwd(),
|
|
234
|
+
execPath: process.execPath,
|
|
235
|
+
encoding: "utf8",
|
|
236
|
+
reject: true,
|
|
237
|
+
cleanup: true,
|
|
238
|
+
all: false,
|
|
239
|
+
windowsHide: true,
|
|
240
|
+
...n
|
|
241
|
+
};
|
|
242
|
+
n.env = getEnv(n);
|
|
243
|
+
n.stdio = u(n);
|
|
244
|
+
if ("win32" === process.platform && "cmd" === r.basename(e, ".exe")) t.unshift("/q");
|
|
245
|
+
return {
|
|
246
|
+
file: e,
|
|
247
|
+
args: t,
|
|
248
|
+
options: n,
|
|
249
|
+
parsed: o
|
|
250
|
+
};
|
|
251
|
+
};
|
|
252
|
+
const handleOutput = (e, t, n)=>{
|
|
253
|
+
if ("string" != typeof t && !Buffer.isBuffer(t)) return void 0 === n ? void 0 : "";
|
|
254
|
+
if (e.stripFinalNewline) return i(t);
|
|
255
|
+
return t;
|
|
256
|
+
};
|
|
257
|
+
const execa = (e, t, n)=>{
|
|
258
|
+
const r = handleArguments(e, t, n);
|
|
259
|
+
const s = w(e, t);
|
|
260
|
+
const i = I(e, t);
|
|
261
|
+
m(r.options);
|
|
262
|
+
let a;
|
|
263
|
+
try {
|
|
264
|
+
a = o.spawn(r.file, r.args, r.options);
|
|
265
|
+
} catch (e) {
|
|
266
|
+
const t = new o.ChildProcess;
|
|
267
|
+
const n = Promise.reject(d({
|
|
268
|
+
error: e,
|
|
269
|
+
stdout: "",
|
|
270
|
+
stderr: "",
|
|
271
|
+
all: "",
|
|
272
|
+
command: s,
|
|
273
|
+
escapedCommand: i,
|
|
274
|
+
parsed: r,
|
|
275
|
+
timedOut: false,
|
|
276
|
+
isCanceled: false,
|
|
277
|
+
killed: false
|
|
278
|
+
}));
|
|
279
|
+
return S(t, n);
|
|
280
|
+
}
|
|
281
|
+
const u = v(a);
|
|
282
|
+
const b = p(a, r.options, u);
|
|
283
|
+
const E = g(a, r.options, b);
|
|
284
|
+
const T = {
|
|
285
|
+
isCanceled: false
|
|
286
|
+
};
|
|
287
|
+
a.kill = l.bind(null, a.kill.bind(a));
|
|
288
|
+
a.cancel = f.bind(null, a, T);
|
|
289
|
+
const handlePromise = async ()=>{
|
|
290
|
+
const [{ error: e, exitCode: t, signal: n, timedOut: o }, c, u, l] = await h(a, r.options, E);
|
|
291
|
+
const f = handleOutput(r.options, c);
|
|
292
|
+
const p = handleOutput(r.options, u);
|
|
293
|
+
const m = handleOutput(r.options, l);
|
|
294
|
+
if (e || 0 !== t || null !== n) {
|
|
295
|
+
const c = d({
|
|
296
|
+
error: e,
|
|
297
|
+
exitCode: t,
|
|
298
|
+
signal: n,
|
|
299
|
+
stdout: f,
|
|
300
|
+
stderr: p,
|
|
301
|
+
all: m,
|
|
302
|
+
command: s,
|
|
303
|
+
escapedCommand: i,
|
|
304
|
+
parsed: r,
|
|
305
|
+
timedOut: o,
|
|
306
|
+
isCanceled: T.isCanceled,
|
|
307
|
+
killed: a.killed
|
|
308
|
+
});
|
|
309
|
+
if (!r.options.reject) return c;
|
|
310
|
+
throw c;
|
|
311
|
+
}
|
|
312
|
+
return {
|
|
313
|
+
command: s,
|
|
314
|
+
escapedCommand: i,
|
|
315
|
+
exitCode: 0,
|
|
316
|
+
stdout: f,
|
|
317
|
+
stderr: p,
|
|
318
|
+
all: m,
|
|
319
|
+
failed: false,
|
|
320
|
+
timedOut: false,
|
|
321
|
+
isCanceled: false,
|
|
322
|
+
killed: false
|
|
323
|
+
};
|
|
324
|
+
};
|
|
325
|
+
const C = c(handlePromise);
|
|
326
|
+
x(a, r.options.input);
|
|
327
|
+
a.all = y(a, r.options);
|
|
328
|
+
return S(a, C);
|
|
329
|
+
};
|
|
330
|
+
e.exports = execa;
|
|
331
|
+
e.exports.sync = (e, t, n)=>{
|
|
332
|
+
const r = handleArguments(e, t, n);
|
|
333
|
+
const s = w(e, t);
|
|
334
|
+
const i = I(e, t);
|
|
335
|
+
b(r.options);
|
|
336
|
+
let a;
|
|
337
|
+
try {
|
|
338
|
+
a = o.spawnSync(r.file, r.args, r.options);
|
|
339
|
+
} catch (e) {
|
|
340
|
+
throw d({
|
|
341
|
+
error: e,
|
|
342
|
+
stdout: "",
|
|
343
|
+
stderr: "",
|
|
344
|
+
all: "",
|
|
345
|
+
command: s,
|
|
346
|
+
escapedCommand: i,
|
|
347
|
+
parsed: r,
|
|
348
|
+
timedOut: false,
|
|
349
|
+
isCanceled: false,
|
|
350
|
+
killed: false
|
|
351
|
+
});
|
|
352
|
+
}
|
|
353
|
+
const c = handleOutput(r.options, a.stdout, a.error);
|
|
354
|
+
const u = handleOutput(r.options, a.stderr, a.error);
|
|
355
|
+
if (a.error || 0 !== a.status || null !== a.signal) {
|
|
356
|
+
const e = d({
|
|
357
|
+
stdout: c,
|
|
358
|
+
stderr: u,
|
|
359
|
+
error: a.error,
|
|
360
|
+
signal: a.signal,
|
|
361
|
+
exitCode: a.status,
|
|
362
|
+
command: s,
|
|
363
|
+
escapedCommand: i,
|
|
364
|
+
parsed: r,
|
|
365
|
+
timedOut: a.error && "ETIMEDOUT" === a.error.code,
|
|
366
|
+
isCanceled: false,
|
|
367
|
+
killed: null !== a.signal
|
|
368
|
+
});
|
|
369
|
+
if (!r.options.reject) return e;
|
|
370
|
+
throw e;
|
|
371
|
+
}
|
|
372
|
+
return {
|
|
373
|
+
command: s,
|
|
374
|
+
escapedCommand: i,
|
|
375
|
+
exitCode: 0,
|
|
376
|
+
stdout: c,
|
|
377
|
+
stderr: u,
|
|
378
|
+
failed: false,
|
|
379
|
+
timedOut: false,
|
|
380
|
+
isCanceled: false,
|
|
381
|
+
killed: false
|
|
382
|
+
};
|
|
383
|
+
};
|
|
384
|
+
e.exports.command = (e, t)=>{
|
|
385
|
+
const [n, ...r] = E(e);
|
|
386
|
+
return execa(n, r, t);
|
|
387
|
+
};
|
|
388
|
+
e.exports.commandSync = (e, t)=>{
|
|
389
|
+
const [n, ...r] = E(e);
|
|
390
|
+
return execa.sync(n, r, t);
|
|
391
|
+
};
|
|
392
|
+
e.exports.node = (e, t, n = {})=>{
|
|
393
|
+
if (t && !Array.isArray(t) && "object" == typeof t) {
|
|
394
|
+
n = t;
|
|
395
|
+
t = [];
|
|
396
|
+
}
|
|
397
|
+
const r = u.node(n);
|
|
398
|
+
const o = process.execArgv.filter((e)=>!e.startsWith("--inspect"));
|
|
399
|
+
const { nodePath: s = process.execPath, nodeOptions: i = o } = n;
|
|
400
|
+
return execa(s, [
|
|
401
|
+
...i,
|
|
402
|
+
e,
|
|
403
|
+
...Array.isArray(t) ? t : []
|
|
404
|
+
], {
|
|
405
|
+
...n,
|
|
406
|
+
stdin: void 0,
|
|
407
|
+
stdout: void 0,
|
|
408
|
+
stderr: void 0,
|
|
409
|
+
stdio: r,
|
|
410
|
+
shell: false
|
|
411
|
+
});
|
|
412
|
+
};
|
|
413
|
+
},
|
|
414
|
+
192: (e)=>{
|
|
415
|
+
"use strict";
|
|
416
|
+
const normalizeArgs = (e, t = [])=>{
|
|
417
|
+
if (!Array.isArray(t)) return [
|
|
418
|
+
e
|
|
419
|
+
];
|
|
420
|
+
return [
|
|
421
|
+
e,
|
|
422
|
+
...t
|
|
423
|
+
];
|
|
424
|
+
};
|
|
425
|
+
const t = /^[\w.-]+$/;
|
|
426
|
+
const n = /"/g;
|
|
427
|
+
const escapeArg = (e)=>{
|
|
428
|
+
if ("string" != typeof e || t.test(e)) return e;
|
|
429
|
+
return `"${e.replace(n, '\\"')}"`;
|
|
430
|
+
};
|
|
431
|
+
const joinCommand = (e, t)=>normalizeArgs(e, t).join(" ");
|
|
432
|
+
const getEscapedCommand = (e, t)=>normalizeArgs(e, t).map((e)=>escapeArg(e)).join(" ");
|
|
433
|
+
const r = / +/g;
|
|
434
|
+
const parseCommand = (e)=>{
|
|
435
|
+
const t = [];
|
|
436
|
+
for (const n of e.trim().split(r)){
|
|
437
|
+
const e = t[t.length - 1];
|
|
438
|
+
if (e && e.endsWith("\\")) t[t.length - 1] = `${e.slice(0, -1)} ${n}`;
|
|
439
|
+
else t.push(n);
|
|
440
|
+
}
|
|
441
|
+
return t;
|
|
442
|
+
};
|
|
443
|
+
e.exports = {
|
|
444
|
+
joinCommand: joinCommand,
|
|
445
|
+
getEscapedCommand: getEscapedCommand,
|
|
446
|
+
parseCommand: parseCommand
|
|
447
|
+
};
|
|
448
|
+
},
|
|
449
|
+
324: (e, t, n)=>{
|
|
450
|
+
"use strict";
|
|
451
|
+
const { signalsByName: r } = n(882);
|
|
452
|
+
const getErrorPrefix = ({ timedOut: e, timeout: t, errorCode: n, signal: r, signalDescription: o, exitCode: s, isCanceled: i })=>{
|
|
453
|
+
if (e) return `timed out after ${t} milliseconds`;
|
|
454
|
+
if (i) return "was canceled";
|
|
455
|
+
if (void 0 !== n) return `failed with ${n}`;
|
|
456
|
+
if (void 0 !== r) return `was killed with ${r} (${o})`;
|
|
457
|
+
if (void 0 !== s) return `failed with exit code ${s}`;
|
|
458
|
+
return "failed";
|
|
459
|
+
};
|
|
460
|
+
const makeError = ({ stdout: e, stderr: t, all: n, error: o, signal: s, exitCode: i, command: a, escapedCommand: c, timedOut: d, isCanceled: u, killed: l, parsed: { options: { timeout: f } } })=>{
|
|
461
|
+
i = null === i ? void 0 : i;
|
|
462
|
+
s = null === s ? void 0 : s;
|
|
463
|
+
const p = void 0 === s ? void 0 : r[s].description;
|
|
464
|
+
const m = o && o.code;
|
|
465
|
+
const g = getErrorPrefix({
|
|
466
|
+
timedOut: d,
|
|
467
|
+
timeout: f,
|
|
468
|
+
errorCode: m,
|
|
469
|
+
signal: s,
|
|
470
|
+
signalDescription: p,
|
|
471
|
+
exitCode: i,
|
|
472
|
+
isCanceled: u
|
|
473
|
+
});
|
|
474
|
+
const x = `Command ${g}: ${a}`;
|
|
475
|
+
const h = "[object Error]" === Object.prototype.toString.call(o);
|
|
476
|
+
const y = h ? `${x}\n${o.message}` : x;
|
|
477
|
+
const b = [
|
|
478
|
+
y,
|
|
479
|
+
t,
|
|
480
|
+
e
|
|
481
|
+
].filter(Boolean).join("\n");
|
|
482
|
+
if (h) {
|
|
483
|
+
o.originalMessage = o.message;
|
|
484
|
+
o.message = b;
|
|
485
|
+
} else o = new Error(b);
|
|
486
|
+
o.shortMessage = y;
|
|
487
|
+
o.command = a;
|
|
488
|
+
o.escapedCommand = c;
|
|
489
|
+
o.exitCode = i;
|
|
490
|
+
o.signal = s;
|
|
491
|
+
o.signalDescription = p;
|
|
492
|
+
o.stdout = e;
|
|
493
|
+
o.stderr = t;
|
|
494
|
+
if (void 0 !== n) o.all = n;
|
|
495
|
+
if ("bufferedData" in o) delete o.bufferedData;
|
|
496
|
+
o.failed = true;
|
|
497
|
+
o.timedOut = Boolean(d);
|
|
498
|
+
o.isCanceled = u;
|
|
499
|
+
o.killed = l && !d;
|
|
500
|
+
return o;
|
|
501
|
+
};
|
|
502
|
+
e.exports = makeError;
|
|
503
|
+
},
|
|
504
|
+
878: (e, t, n)=>{
|
|
505
|
+
"use strict";
|
|
506
|
+
const r = n(37);
|
|
507
|
+
const o = n(580);
|
|
508
|
+
const s = 5000;
|
|
509
|
+
const spawnedKill = (e, t = "SIGTERM", n = {})=>{
|
|
510
|
+
const r = e(t);
|
|
511
|
+
setKillTimeout(e, t, n, r);
|
|
512
|
+
return r;
|
|
513
|
+
};
|
|
514
|
+
const setKillTimeout = (e, t, n, r)=>{
|
|
515
|
+
if (!shouldForceKill(t, n, r)) return;
|
|
516
|
+
const o = getForceKillAfterTimeout(n);
|
|
517
|
+
const s = setTimeout(()=>{
|
|
518
|
+
e("SIGKILL");
|
|
519
|
+
}, o);
|
|
520
|
+
if (s.unref) s.unref();
|
|
521
|
+
};
|
|
522
|
+
const shouldForceKill = (e, { forceKillAfterTimeout: t }, n)=>isSigterm(e) && false !== t && n;
|
|
523
|
+
const isSigterm = (e)=>e === r.constants.signals.SIGTERM || "string" == typeof e && "SIGTERM" === e.toUpperCase();
|
|
524
|
+
const getForceKillAfterTimeout = ({ forceKillAfterTimeout: e = true })=>{
|
|
525
|
+
if (true === e) return s;
|
|
526
|
+
if (!Number.isFinite(e) || e < 0) throw new TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);
|
|
527
|
+
return e;
|
|
528
|
+
};
|
|
529
|
+
const spawnedCancel = (e, t)=>{
|
|
530
|
+
const n = e.kill();
|
|
531
|
+
if (n) t.isCanceled = true;
|
|
532
|
+
};
|
|
533
|
+
const timeoutKill = (e, t, n)=>{
|
|
534
|
+
e.kill(t);
|
|
535
|
+
n(Object.assign(new Error("Timed out"), {
|
|
536
|
+
timedOut: true,
|
|
537
|
+
signal: t
|
|
538
|
+
}));
|
|
539
|
+
};
|
|
540
|
+
const setupTimeout = (e, { timeout: t, killSignal: n = "SIGTERM" }, r)=>{
|
|
541
|
+
if (0 === t || void 0 === t) return r;
|
|
542
|
+
let o;
|
|
543
|
+
const s = new Promise((r, s)=>{
|
|
544
|
+
o = setTimeout(()=>{
|
|
545
|
+
timeoutKill(e, n, s);
|
|
546
|
+
}, t);
|
|
547
|
+
});
|
|
548
|
+
const i = r.finally(()=>{
|
|
549
|
+
clearTimeout(o);
|
|
550
|
+
});
|
|
551
|
+
return Promise.race([
|
|
552
|
+
s,
|
|
553
|
+
i
|
|
554
|
+
]);
|
|
555
|
+
};
|
|
556
|
+
const validateTimeout = ({ timeout: e })=>{
|
|
557
|
+
if (void 0 !== e && (!Number.isFinite(e) || e < 0)) throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);
|
|
558
|
+
};
|
|
559
|
+
const setExitHandler = async (e, { cleanup: t, detached: n }, r)=>{
|
|
560
|
+
if (!t || n) return r;
|
|
561
|
+
const s = o(()=>{
|
|
562
|
+
e.kill();
|
|
563
|
+
});
|
|
564
|
+
return r.finally(()=>{
|
|
565
|
+
s();
|
|
566
|
+
});
|
|
567
|
+
};
|
|
568
|
+
e.exports = {
|
|
569
|
+
spawnedKill: spawnedKill,
|
|
570
|
+
spawnedCancel: spawnedCancel,
|
|
571
|
+
setupTimeout: setupTimeout,
|
|
572
|
+
validateTimeout: validateTimeout,
|
|
573
|
+
setExitHandler: setExitHandler
|
|
574
|
+
};
|
|
575
|
+
},
|
|
576
|
+
210: (e)=>{
|
|
577
|
+
"use strict";
|
|
578
|
+
const t = (async ()=>{})().constructor.prototype;
|
|
579
|
+
const n = [
|
|
580
|
+
"then",
|
|
581
|
+
"catch",
|
|
582
|
+
"finally"
|
|
583
|
+
].map((e)=>[
|
|
584
|
+
e,
|
|
585
|
+
Reflect.getOwnPropertyDescriptor(t, e)
|
|
586
|
+
]);
|
|
587
|
+
const mergePromise = (e, t)=>{
|
|
588
|
+
for (const [r, o] of n){
|
|
589
|
+
const n = "function" == typeof t ? (...e)=>Reflect.apply(o.value, t(), e) : o.value.bind(t);
|
|
590
|
+
Reflect.defineProperty(e, r, {
|
|
591
|
+
...o,
|
|
592
|
+
value: n
|
|
593
|
+
});
|
|
594
|
+
}
|
|
595
|
+
return e;
|
|
596
|
+
};
|
|
597
|
+
const getSpawnedPromise = (e)=>new Promise((t, n)=>{
|
|
598
|
+
e.on("exit", (e, n)=>{
|
|
599
|
+
t({
|
|
600
|
+
exitCode: e,
|
|
601
|
+
signal: n
|
|
602
|
+
});
|
|
603
|
+
});
|
|
604
|
+
e.on("error", (e)=>{
|
|
605
|
+
n(e);
|
|
606
|
+
});
|
|
607
|
+
if (e.stdin) e.stdin.on("error", (e)=>{
|
|
608
|
+
n(e);
|
|
609
|
+
});
|
|
610
|
+
});
|
|
611
|
+
e.exports = {
|
|
612
|
+
mergePromise: mergePromise,
|
|
613
|
+
getSpawnedPromise: getSpawnedPromise
|
|
614
|
+
};
|
|
615
|
+
},
|
|
616
|
+
166: (e)=>{
|
|
617
|
+
"use strict";
|
|
618
|
+
const t = [
|
|
619
|
+
"stdin",
|
|
620
|
+
"stdout",
|
|
621
|
+
"stderr"
|
|
622
|
+
];
|
|
623
|
+
const hasAlias = (e)=>t.some((t)=>void 0 !== e[t]);
|
|
624
|
+
const normalizeStdio = (e)=>{
|
|
625
|
+
if (!e) return;
|
|
626
|
+
const { stdio: n } = e;
|
|
627
|
+
if (void 0 === n) return t.map((t)=>e[t]);
|
|
628
|
+
if (hasAlias(e)) throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${t.map((e)=>`\`${e}\``).join(", ")}`);
|
|
629
|
+
if ("string" == typeof n) return n;
|
|
630
|
+
if (!Array.isArray(n)) throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof n}\``);
|
|
631
|
+
const r = Math.max(n.length, t.length);
|
|
632
|
+
return Array.from({
|
|
633
|
+
length: r
|
|
634
|
+
}, (e, t)=>n[t]);
|
|
635
|
+
};
|
|
636
|
+
e.exports = normalizeStdio;
|
|
637
|
+
e.exports.node = (e)=>{
|
|
638
|
+
const t = normalizeStdio(e);
|
|
639
|
+
if ("ipc" === t) return "ipc";
|
|
640
|
+
if (void 0 === t || "string" == typeof t) return [
|
|
641
|
+
t,
|
|
642
|
+
t,
|
|
643
|
+
t,
|
|
644
|
+
"ipc"
|
|
645
|
+
];
|
|
646
|
+
if (t.includes("ipc")) return t;
|
|
647
|
+
return [
|
|
648
|
+
...t,
|
|
649
|
+
"ipc"
|
|
650
|
+
];
|
|
651
|
+
};
|
|
652
|
+
},
|
|
653
|
+
533: (e, t, n)=>{
|
|
654
|
+
"use strict";
|
|
655
|
+
const r = n(434);
|
|
656
|
+
const o = n(981);
|
|
657
|
+
const s = n(853);
|
|
658
|
+
const handleInput = (e, t)=>{
|
|
659
|
+
if (void 0 === t || void 0 === e.stdin) return;
|
|
660
|
+
if (r(t)) t.pipe(e.stdin);
|
|
661
|
+
else e.stdin.end(t);
|
|
662
|
+
};
|
|
663
|
+
const makeAllStream = (e, { all: t })=>{
|
|
664
|
+
if (!t || !e.stdout && !e.stderr) return;
|
|
665
|
+
const n = s();
|
|
666
|
+
if (e.stdout) n.add(e.stdout);
|
|
667
|
+
if (e.stderr) n.add(e.stderr);
|
|
668
|
+
return n;
|
|
669
|
+
};
|
|
670
|
+
const getBufferedData = async (e, t)=>{
|
|
671
|
+
if (!e) return;
|
|
672
|
+
e.destroy();
|
|
673
|
+
try {
|
|
674
|
+
return await t;
|
|
675
|
+
} catch (e) {
|
|
676
|
+
return e.bufferedData;
|
|
677
|
+
}
|
|
678
|
+
};
|
|
679
|
+
const getStreamPromise = (e, { encoding: t, buffer: n, maxBuffer: r })=>{
|
|
680
|
+
if (!e || !n) return;
|
|
681
|
+
if (t) return o(e, {
|
|
682
|
+
encoding: t,
|
|
683
|
+
maxBuffer: r
|
|
684
|
+
});
|
|
685
|
+
return o.buffer(e, {
|
|
686
|
+
maxBuffer: r
|
|
687
|
+
});
|
|
688
|
+
};
|
|
689
|
+
const getSpawnedResult = async ({ stdout: e, stderr: t, all: n }, { encoding: r, buffer: o, maxBuffer: s }, i)=>{
|
|
690
|
+
const a = getStreamPromise(e, {
|
|
691
|
+
encoding: r,
|
|
692
|
+
buffer: o,
|
|
693
|
+
maxBuffer: s
|
|
694
|
+
});
|
|
695
|
+
const c = getStreamPromise(t, {
|
|
696
|
+
encoding: r,
|
|
697
|
+
buffer: o,
|
|
698
|
+
maxBuffer: s
|
|
699
|
+
});
|
|
700
|
+
const d = getStreamPromise(n, {
|
|
701
|
+
encoding: r,
|
|
702
|
+
buffer: o,
|
|
703
|
+
maxBuffer: 2 * s
|
|
704
|
+
});
|
|
705
|
+
try {
|
|
706
|
+
return await Promise.all([
|
|
707
|
+
i,
|
|
708
|
+
a,
|
|
709
|
+
c,
|
|
710
|
+
d
|
|
711
|
+
]);
|
|
712
|
+
} catch (r) {
|
|
713
|
+
return Promise.all([
|
|
714
|
+
{
|
|
715
|
+
error: r,
|
|
716
|
+
signal: r.signal,
|
|
717
|
+
timedOut: r.timedOut
|
|
718
|
+
},
|
|
719
|
+
getBufferedData(e, a),
|
|
720
|
+
getBufferedData(t, c),
|
|
721
|
+
getBufferedData(n, d)
|
|
722
|
+
]);
|
|
723
|
+
}
|
|
724
|
+
};
|
|
725
|
+
const validateInputSync = ({ input: e })=>{
|
|
726
|
+
if (r(e)) throw new TypeError("The `input` option cannot be a stream in sync mode");
|
|
727
|
+
};
|
|
728
|
+
e.exports = {
|
|
729
|
+
handleInput: handleInput,
|
|
730
|
+
makeAllStream: makeAllStream,
|
|
731
|
+
getSpawnedResult: getSpawnedResult,
|
|
732
|
+
validateInputSync: validateInputSync
|
|
733
|
+
};
|
|
734
|
+
},
|
|
735
|
+
782: (e, t, n)=>{
|
|
736
|
+
"use strict";
|
|
737
|
+
const { PassThrough: r } = n(781);
|
|
738
|
+
e.exports = (e)=>{
|
|
739
|
+
e = {
|
|
740
|
+
...e
|
|
741
|
+
};
|
|
742
|
+
const { array: t } = e;
|
|
743
|
+
let { encoding: n } = e;
|
|
744
|
+
const o = "buffer" === n;
|
|
745
|
+
let s = false;
|
|
746
|
+
if (t) s = !(n || o);
|
|
747
|
+
else n = n || "utf8";
|
|
748
|
+
if (o) n = null;
|
|
749
|
+
const i = new r({
|
|
750
|
+
objectMode: s
|
|
751
|
+
});
|
|
752
|
+
if (n) i.setEncoding(n);
|
|
753
|
+
let a = 0;
|
|
754
|
+
const c = [];
|
|
755
|
+
i.on("data", (e)=>{
|
|
756
|
+
c.push(e);
|
|
757
|
+
if (s) a = c.length;
|
|
758
|
+
else a += e.length;
|
|
759
|
+
});
|
|
760
|
+
i.getBufferedValue = ()=>{
|
|
761
|
+
if (t) return c;
|
|
762
|
+
return o ? Buffer.concat(c, a) : c.join("");
|
|
763
|
+
};
|
|
764
|
+
i.getBufferedLength = ()=>a;
|
|
765
|
+
return i;
|
|
766
|
+
};
|
|
767
|
+
},
|
|
768
|
+
981: (e, t, n)=>{
|
|
769
|
+
"use strict";
|
|
770
|
+
const { constants: r } = n(300);
|
|
771
|
+
const o = n(781);
|
|
772
|
+
const { promisify: s } = n(837);
|
|
773
|
+
const i = n(782);
|
|
774
|
+
const a = s(o.pipeline);
|
|
775
|
+
class MaxBufferError extends Error {
|
|
776
|
+
constructor(){
|
|
777
|
+
super("maxBuffer exceeded");
|
|
778
|
+
this.name = "MaxBufferError";
|
|
779
|
+
}
|
|
780
|
+
}
|
|
781
|
+
async function getStream(e, t) {
|
|
782
|
+
if (!e) throw new Error("Expected a stream");
|
|
783
|
+
t = {
|
|
784
|
+
maxBuffer: 1 / 0,
|
|
785
|
+
...t
|
|
786
|
+
};
|
|
787
|
+
const { maxBuffer: n } = t;
|
|
788
|
+
const o = i(t);
|
|
789
|
+
await new Promise((t, s)=>{
|
|
790
|
+
const rejectPromise = (e)=>{
|
|
791
|
+
if (e && o.getBufferedLength() <= r.MAX_LENGTH) e.bufferedData = o.getBufferedValue();
|
|
792
|
+
s(e);
|
|
793
|
+
};
|
|
794
|
+
(async ()=>{
|
|
795
|
+
try {
|
|
796
|
+
await a(e, o);
|
|
797
|
+
t();
|
|
798
|
+
} catch (e) {
|
|
799
|
+
rejectPromise(e);
|
|
800
|
+
}
|
|
801
|
+
})();
|
|
802
|
+
o.on("data", ()=>{
|
|
803
|
+
if (o.getBufferedLength() > n) rejectPromise(new MaxBufferError);
|
|
804
|
+
});
|
|
805
|
+
});
|
|
806
|
+
return o.getBufferedValue();
|
|
807
|
+
}
|
|
808
|
+
e.exports = getStream;
|
|
809
|
+
e.exports.buffer = (e, t)=>getStream(e, {
|
|
810
|
+
...t,
|
|
811
|
+
encoding: "buffer"
|
|
812
|
+
});
|
|
813
|
+
e.exports.array = (e, t)=>getStream(e, {
|
|
814
|
+
...t,
|
|
815
|
+
array: true
|
|
816
|
+
});
|
|
817
|
+
e.exports.MaxBufferError = MaxBufferError;
|
|
818
|
+
},
|
|
819
|
+
221: (e, t)=>{
|
|
820
|
+
"use strict";
|
|
821
|
+
Object.defineProperty(t, "__esModule", {
|
|
822
|
+
value: true
|
|
823
|
+
});
|
|
824
|
+
t.SIGNALS = void 0;
|
|
825
|
+
const n = [
|
|
826
|
+
{
|
|
827
|
+
name: "SIGHUP",
|
|
828
|
+
number: 1,
|
|
829
|
+
action: "terminate",
|
|
830
|
+
description: "Terminal closed",
|
|
831
|
+
standard: "posix"
|
|
832
|
+
},
|
|
833
|
+
{
|
|
834
|
+
name: "SIGINT",
|
|
835
|
+
number: 2,
|
|
836
|
+
action: "terminate",
|
|
837
|
+
description: "User interruption with CTRL-C",
|
|
838
|
+
standard: "ansi"
|
|
839
|
+
},
|
|
840
|
+
{
|
|
841
|
+
name: "SIGQUIT",
|
|
842
|
+
number: 3,
|
|
843
|
+
action: "core",
|
|
844
|
+
description: "User interruption with CTRL-\\",
|
|
845
|
+
standard: "posix"
|
|
846
|
+
},
|
|
847
|
+
{
|
|
848
|
+
name: "SIGILL",
|
|
849
|
+
number: 4,
|
|
850
|
+
action: "core",
|
|
851
|
+
description: "Invalid machine instruction",
|
|
852
|
+
standard: "ansi"
|
|
853
|
+
},
|
|
854
|
+
{
|
|
855
|
+
name: "SIGTRAP",
|
|
856
|
+
number: 5,
|
|
857
|
+
action: "core",
|
|
858
|
+
description: "Debugger breakpoint",
|
|
859
|
+
standard: "posix"
|
|
860
|
+
},
|
|
861
|
+
{
|
|
862
|
+
name: "SIGABRT",
|
|
863
|
+
number: 6,
|
|
864
|
+
action: "core",
|
|
865
|
+
description: "Aborted",
|
|
866
|
+
standard: "ansi"
|
|
867
|
+
},
|
|
868
|
+
{
|
|
869
|
+
name: "SIGIOT",
|
|
870
|
+
number: 6,
|
|
871
|
+
action: "core",
|
|
872
|
+
description: "Aborted",
|
|
873
|
+
standard: "bsd"
|
|
874
|
+
},
|
|
875
|
+
{
|
|
876
|
+
name: "SIGBUS",
|
|
877
|
+
number: 7,
|
|
878
|
+
action: "core",
|
|
879
|
+
description: "Bus error due to misaligned, non-existing address or paging error",
|
|
880
|
+
standard: "bsd"
|
|
881
|
+
},
|
|
882
|
+
{
|
|
883
|
+
name: "SIGEMT",
|
|
884
|
+
number: 7,
|
|
885
|
+
action: "terminate",
|
|
886
|
+
description: "Command should be emulated but is not implemented",
|
|
887
|
+
standard: "other"
|
|
888
|
+
},
|
|
889
|
+
{
|
|
890
|
+
name: "SIGFPE",
|
|
891
|
+
number: 8,
|
|
892
|
+
action: "core",
|
|
893
|
+
description: "Floating point arithmetic error",
|
|
894
|
+
standard: "ansi"
|
|
895
|
+
},
|
|
896
|
+
{
|
|
897
|
+
name: "SIGKILL",
|
|
898
|
+
number: 9,
|
|
899
|
+
action: "terminate",
|
|
900
|
+
description: "Forced termination",
|
|
901
|
+
standard: "posix",
|
|
902
|
+
forced: true
|
|
903
|
+
},
|
|
904
|
+
{
|
|
905
|
+
name: "SIGUSR1",
|
|
906
|
+
number: 10,
|
|
907
|
+
action: "terminate",
|
|
908
|
+
description: "Application-specific signal",
|
|
909
|
+
standard: "posix"
|
|
910
|
+
},
|
|
911
|
+
{
|
|
912
|
+
name: "SIGSEGV",
|
|
913
|
+
number: 11,
|
|
914
|
+
action: "core",
|
|
915
|
+
description: "Segmentation fault",
|
|
916
|
+
standard: "ansi"
|
|
917
|
+
},
|
|
918
|
+
{
|
|
919
|
+
name: "SIGUSR2",
|
|
920
|
+
number: 12,
|
|
921
|
+
action: "terminate",
|
|
922
|
+
description: "Application-specific signal",
|
|
923
|
+
standard: "posix"
|
|
924
|
+
},
|
|
925
|
+
{
|
|
926
|
+
name: "SIGPIPE",
|
|
927
|
+
number: 13,
|
|
928
|
+
action: "terminate",
|
|
929
|
+
description: "Broken pipe or socket",
|
|
930
|
+
standard: "posix"
|
|
931
|
+
},
|
|
932
|
+
{
|
|
933
|
+
name: "SIGALRM",
|
|
934
|
+
number: 14,
|
|
935
|
+
action: "terminate",
|
|
936
|
+
description: "Timeout or timer",
|
|
937
|
+
standard: "posix"
|
|
938
|
+
},
|
|
939
|
+
{
|
|
940
|
+
name: "SIGTERM",
|
|
941
|
+
number: 15,
|
|
942
|
+
action: "terminate",
|
|
943
|
+
description: "Termination",
|
|
944
|
+
standard: "ansi"
|
|
945
|
+
},
|
|
946
|
+
{
|
|
947
|
+
name: "SIGSTKFLT",
|
|
948
|
+
number: 16,
|
|
949
|
+
action: "terminate",
|
|
950
|
+
description: "Stack is empty or overflowed",
|
|
951
|
+
standard: "other"
|
|
952
|
+
},
|
|
953
|
+
{
|
|
954
|
+
name: "SIGCHLD",
|
|
955
|
+
number: 17,
|
|
956
|
+
action: "ignore",
|
|
957
|
+
description: "Child process terminated, paused or unpaused",
|
|
958
|
+
standard: "posix"
|
|
959
|
+
},
|
|
960
|
+
{
|
|
961
|
+
name: "SIGCLD",
|
|
962
|
+
number: 17,
|
|
963
|
+
action: "ignore",
|
|
964
|
+
description: "Child process terminated, paused or unpaused",
|
|
965
|
+
standard: "other"
|
|
966
|
+
},
|
|
967
|
+
{
|
|
968
|
+
name: "SIGCONT",
|
|
969
|
+
number: 18,
|
|
970
|
+
action: "unpause",
|
|
971
|
+
description: "Unpaused",
|
|
972
|
+
standard: "posix",
|
|
973
|
+
forced: true
|
|
974
|
+
},
|
|
975
|
+
{
|
|
976
|
+
name: "SIGSTOP",
|
|
977
|
+
number: 19,
|
|
978
|
+
action: "pause",
|
|
979
|
+
description: "Paused",
|
|
980
|
+
standard: "posix",
|
|
981
|
+
forced: true
|
|
982
|
+
},
|
|
983
|
+
{
|
|
984
|
+
name: "SIGTSTP",
|
|
985
|
+
number: 20,
|
|
986
|
+
action: "pause",
|
|
987
|
+
description: 'Paused using CTRL-Z or "suspend"',
|
|
988
|
+
standard: "posix"
|
|
989
|
+
},
|
|
990
|
+
{
|
|
991
|
+
name: "SIGTTIN",
|
|
992
|
+
number: 21,
|
|
993
|
+
action: "pause",
|
|
994
|
+
description: "Background process cannot read terminal input",
|
|
995
|
+
standard: "posix"
|
|
996
|
+
},
|
|
997
|
+
{
|
|
998
|
+
name: "SIGBREAK",
|
|
999
|
+
number: 21,
|
|
1000
|
+
action: "terminate",
|
|
1001
|
+
description: "User interruption with CTRL-BREAK",
|
|
1002
|
+
standard: "other"
|
|
1003
|
+
},
|
|
1004
|
+
{
|
|
1005
|
+
name: "SIGTTOU",
|
|
1006
|
+
number: 22,
|
|
1007
|
+
action: "pause",
|
|
1008
|
+
description: "Background process cannot write to terminal output",
|
|
1009
|
+
standard: "posix"
|
|
1010
|
+
},
|
|
1011
|
+
{
|
|
1012
|
+
name: "SIGURG",
|
|
1013
|
+
number: 23,
|
|
1014
|
+
action: "ignore",
|
|
1015
|
+
description: "Socket received out-of-band data",
|
|
1016
|
+
standard: "bsd"
|
|
1017
|
+
},
|
|
1018
|
+
{
|
|
1019
|
+
name: "SIGXCPU",
|
|
1020
|
+
number: 24,
|
|
1021
|
+
action: "core",
|
|
1022
|
+
description: "Process timed out",
|
|
1023
|
+
standard: "bsd"
|
|
1024
|
+
},
|
|
1025
|
+
{
|
|
1026
|
+
name: "SIGXFSZ",
|
|
1027
|
+
number: 25,
|
|
1028
|
+
action: "core",
|
|
1029
|
+
description: "File too big",
|
|
1030
|
+
standard: "bsd"
|
|
1031
|
+
},
|
|
1032
|
+
{
|
|
1033
|
+
name: "SIGVTALRM",
|
|
1034
|
+
number: 26,
|
|
1035
|
+
action: "terminate",
|
|
1036
|
+
description: "Timeout or timer",
|
|
1037
|
+
standard: "bsd"
|
|
1038
|
+
},
|
|
1039
|
+
{
|
|
1040
|
+
name: "SIGPROF",
|
|
1041
|
+
number: 27,
|
|
1042
|
+
action: "terminate",
|
|
1043
|
+
description: "Timeout or timer",
|
|
1044
|
+
standard: "bsd"
|
|
1045
|
+
},
|
|
1046
|
+
{
|
|
1047
|
+
name: "SIGWINCH",
|
|
1048
|
+
number: 28,
|
|
1049
|
+
action: "ignore",
|
|
1050
|
+
description: "Terminal window size changed",
|
|
1051
|
+
standard: "bsd"
|
|
1052
|
+
},
|
|
1053
|
+
{
|
|
1054
|
+
name: "SIGIO",
|
|
1055
|
+
number: 29,
|
|
1056
|
+
action: "terminate",
|
|
1057
|
+
description: "I/O is available",
|
|
1058
|
+
standard: "other"
|
|
1059
|
+
},
|
|
1060
|
+
{
|
|
1061
|
+
name: "SIGPOLL",
|
|
1062
|
+
number: 29,
|
|
1063
|
+
action: "terminate",
|
|
1064
|
+
description: "Watched event",
|
|
1065
|
+
standard: "other"
|
|
1066
|
+
},
|
|
1067
|
+
{
|
|
1068
|
+
name: "SIGINFO",
|
|
1069
|
+
number: 29,
|
|
1070
|
+
action: "ignore",
|
|
1071
|
+
description: "Request for process information",
|
|
1072
|
+
standard: "other"
|
|
1073
|
+
},
|
|
1074
|
+
{
|
|
1075
|
+
name: "SIGPWR",
|
|
1076
|
+
number: 30,
|
|
1077
|
+
action: "terminate",
|
|
1078
|
+
description: "Device running out of power",
|
|
1079
|
+
standard: "systemv"
|
|
1080
|
+
},
|
|
1081
|
+
{
|
|
1082
|
+
name: "SIGSYS",
|
|
1083
|
+
number: 31,
|
|
1084
|
+
action: "core",
|
|
1085
|
+
description: "Invalid system call",
|
|
1086
|
+
standard: "other"
|
|
1087
|
+
},
|
|
1088
|
+
{
|
|
1089
|
+
name: "SIGUNUSED",
|
|
1090
|
+
number: 31,
|
|
1091
|
+
action: "terminate",
|
|
1092
|
+
description: "Invalid system call",
|
|
1093
|
+
standard: "other"
|
|
1094
|
+
}
|
|
1095
|
+
];
|
|
1096
|
+
t.SIGNALS = n;
|
|
1097
|
+
},
|
|
1098
|
+
882: (e, t, n)=>{
|
|
1099
|
+
"use strict";
|
|
1100
|
+
Object.defineProperty(t, "__esModule", {
|
|
1101
|
+
value: true
|
|
1102
|
+
});
|
|
1103
|
+
t.signalsByNumber = t.signalsByName = void 0;
|
|
1104
|
+
var r = n(37);
|
|
1105
|
+
var o = n(922);
|
|
1106
|
+
var s = n(840);
|
|
1107
|
+
const getSignalsByName = function() {
|
|
1108
|
+
const e = (0, o.getSignals)();
|
|
1109
|
+
return e.reduce(getSignalByName, {});
|
|
1110
|
+
};
|
|
1111
|
+
const getSignalByName = function(e, { name: t, number: n, description: r, supported: o, action: s, forced: i, standard: a }) {
|
|
1112
|
+
return {
|
|
1113
|
+
...e,
|
|
1114
|
+
[t]: {
|
|
1115
|
+
name: t,
|
|
1116
|
+
number: n,
|
|
1117
|
+
description: r,
|
|
1118
|
+
supported: o,
|
|
1119
|
+
action: s,
|
|
1120
|
+
forced: i,
|
|
1121
|
+
standard: a
|
|
1122
|
+
}
|
|
1123
|
+
};
|
|
1124
|
+
};
|
|
1125
|
+
const i = getSignalsByName();
|
|
1126
|
+
t.signalsByName = i;
|
|
1127
|
+
const getSignalsByNumber = function() {
|
|
1128
|
+
const e = (0, o.getSignals)();
|
|
1129
|
+
const t = s.SIGRTMAX + 1;
|
|
1130
|
+
const n = Array.from({
|
|
1131
|
+
length: t
|
|
1132
|
+
}, (t, n)=>getSignalByNumber(n, e));
|
|
1133
|
+
return Object.assign({}, ...n);
|
|
1134
|
+
};
|
|
1135
|
+
const getSignalByNumber = function(e, t) {
|
|
1136
|
+
const n = findSignalByNumber(e, t);
|
|
1137
|
+
if (void 0 === n) return {};
|
|
1138
|
+
const { name: r, description: o, supported: s, action: i, forced: a, standard: c } = n;
|
|
1139
|
+
return {
|
|
1140
|
+
[e]: {
|
|
1141
|
+
name: r,
|
|
1142
|
+
number: e,
|
|
1143
|
+
description: o,
|
|
1144
|
+
supported: s,
|
|
1145
|
+
action: i,
|
|
1146
|
+
forced: a,
|
|
1147
|
+
standard: c
|
|
1148
|
+
}
|
|
1149
|
+
};
|
|
1150
|
+
};
|
|
1151
|
+
const findSignalByNumber = function(e, t) {
|
|
1152
|
+
const n = t.find(({ name: t })=>r.constants.signals[t] === e);
|
|
1153
|
+
if (void 0 !== n) return n;
|
|
1154
|
+
return t.find((t)=>t.number === e);
|
|
1155
|
+
};
|
|
1156
|
+
const a = getSignalsByNumber();
|
|
1157
|
+
t.signalsByNumber = a;
|
|
1158
|
+
},
|
|
1159
|
+
840: (e, t)=>{
|
|
1160
|
+
"use strict";
|
|
1161
|
+
Object.defineProperty(t, "__esModule", {
|
|
1162
|
+
value: true
|
|
1163
|
+
});
|
|
1164
|
+
t.SIGRTMAX = t.getRealtimeSignals = void 0;
|
|
1165
|
+
const getRealtimeSignals = function() {
|
|
1166
|
+
const e = r - n + 1;
|
|
1167
|
+
return Array.from({
|
|
1168
|
+
length: e
|
|
1169
|
+
}, getRealtimeSignal);
|
|
1170
|
+
};
|
|
1171
|
+
t.getRealtimeSignals = getRealtimeSignals;
|
|
1172
|
+
const getRealtimeSignal = function(e, t) {
|
|
1173
|
+
return {
|
|
1174
|
+
name: `SIGRT${t + 1}`,
|
|
1175
|
+
number: n + t,
|
|
1176
|
+
action: "terminate",
|
|
1177
|
+
description: "Application-specific signal (realtime)",
|
|
1178
|
+
standard: "posix"
|
|
1179
|
+
};
|
|
1180
|
+
};
|
|
1181
|
+
const n = 34;
|
|
1182
|
+
const r = 64;
|
|
1183
|
+
t.SIGRTMAX = r;
|
|
1184
|
+
},
|
|
1185
|
+
922: (e, t, n)=>{
|
|
1186
|
+
"use strict";
|
|
1187
|
+
Object.defineProperty(t, "__esModule", {
|
|
1188
|
+
value: true
|
|
1189
|
+
});
|
|
1190
|
+
t.getSignals = void 0;
|
|
1191
|
+
var r = n(37);
|
|
1192
|
+
var o = n(221);
|
|
1193
|
+
var s = n(840);
|
|
1194
|
+
const getSignals = function() {
|
|
1195
|
+
const e = (0, s.getRealtimeSignals)();
|
|
1196
|
+
const t = [
|
|
1197
|
+
...o.SIGNALS,
|
|
1198
|
+
...e
|
|
1199
|
+
].map(normalizeSignal);
|
|
1200
|
+
return t;
|
|
1201
|
+
};
|
|
1202
|
+
t.getSignals = getSignals;
|
|
1203
|
+
const normalizeSignal = function({ name: e, number: t, description: n, action: o, forced: s = false, standard: i }) {
|
|
1204
|
+
const { signals: { [e]: a } } = r.constants;
|
|
1205
|
+
const c = void 0 !== a;
|
|
1206
|
+
const d = c ? a : t;
|
|
1207
|
+
return {
|
|
1208
|
+
name: e,
|
|
1209
|
+
number: d,
|
|
1210
|
+
description: n,
|
|
1211
|
+
supported: c,
|
|
1212
|
+
action: o,
|
|
1213
|
+
forced: s,
|
|
1214
|
+
standard: i
|
|
1215
|
+
};
|
|
1216
|
+
};
|
|
1217
|
+
},
|
|
1218
|
+
434: (e)=>{
|
|
1219
|
+
"use strict";
|
|
1220
|
+
const isStream = (e)=>null !== e && "object" == typeof e && "function" == typeof e.pipe;
|
|
1221
|
+
isStream.writable = (e)=>isStream(e) && false !== e.writable && "function" == typeof e._write && "object" == typeof e._writableState;
|
|
1222
|
+
isStream.readable = (e)=>isStream(e) && false !== e.readable && "function" == typeof e._read && "object" == typeof e._readableState;
|
|
1223
|
+
isStream.duplex = (e)=>isStream.writable(e) && isStream.readable(e);
|
|
1224
|
+
isStream.transform = (e)=>isStream.duplex(e) && "function" == typeof e._transform;
|
|
1225
|
+
e.exports = isStream;
|
|
1226
|
+
},
|
|
1227
|
+
212: (e, t, n)=>{
|
|
1228
|
+
n(147);
|
|
1229
|
+
var o;
|
|
1230
|
+
o = "win32" === process.platform || global.TESTING_WINDOWS ? n(476) : n(836);
|
|
1231
|
+
e.exports = isexe;
|
|
1232
|
+
isexe.sync = sync;
|
|
1233
|
+
function isexe(e, t, n) {
|
|
1234
|
+
if ("function" == typeof t) {
|
|
1235
|
+
n = t;
|
|
1236
|
+
t = {};
|
|
1237
|
+
}
|
|
1238
|
+
if (!n) {
|
|
1239
|
+
if ("function" != typeof Promise) throw new TypeError("callback not provided");
|
|
1240
|
+
return new Promise(function(n, r) {
|
|
1241
|
+
isexe(e, t || {}, function(e, t) {
|
|
1242
|
+
if (e) r(e);
|
|
1243
|
+
else n(t);
|
|
1244
|
+
});
|
|
1245
|
+
});
|
|
1246
|
+
}
|
|
1247
|
+
o(e, t || {}, function(e, r) {
|
|
1248
|
+
if (e) {
|
|
1249
|
+
if ("EACCES" === e.code || t && t.ignoreErrors) {
|
|
1250
|
+
e = null;
|
|
1251
|
+
r = false;
|
|
1252
|
+
}
|
|
1253
|
+
}
|
|
1254
|
+
n(e, r);
|
|
1255
|
+
});
|
|
1256
|
+
}
|
|
1257
|
+
function sync(e, t) {
|
|
1258
|
+
try {
|
|
1259
|
+
return o.sync(e, t || {});
|
|
1260
|
+
} catch (e) {
|
|
1261
|
+
if (t && t.ignoreErrors || "EACCES" === e.code) return false;
|
|
1262
|
+
throw e;
|
|
1263
|
+
}
|
|
1264
|
+
}
|
|
1265
|
+
},
|
|
1266
|
+
836: (e, t, n)=>{
|
|
1267
|
+
e.exports = isexe;
|
|
1268
|
+
isexe.sync = sync;
|
|
1269
|
+
var r = n(147);
|
|
1270
|
+
function isexe(e, t, n) {
|
|
1271
|
+
r.stat(e, function(e, r) {
|
|
1272
|
+
n(e, e ? false : checkStat(r, t));
|
|
1273
|
+
});
|
|
1274
|
+
}
|
|
1275
|
+
function sync(e, t) {
|
|
1276
|
+
return checkStat(r.statSync(e), t);
|
|
1277
|
+
}
|
|
1278
|
+
function checkStat(e, t) {
|
|
1279
|
+
return e.isFile() && checkMode(e, t);
|
|
1280
|
+
}
|
|
1281
|
+
function checkMode(e, t) {
|
|
1282
|
+
var n = e.mode;
|
|
1283
|
+
var r = e.uid;
|
|
1284
|
+
var o = e.gid;
|
|
1285
|
+
var s = void 0 !== t.uid ? t.uid : process.getuid && process.getuid();
|
|
1286
|
+
var i = void 0 !== t.gid ? t.gid : process.getgid && process.getgid();
|
|
1287
|
+
var a = parseInt("100", 8);
|
|
1288
|
+
var c = parseInt("010", 8);
|
|
1289
|
+
var d = parseInt("001", 8);
|
|
1290
|
+
var u = a | c;
|
|
1291
|
+
var l = n & d || n & c && o === i || n & a && r === s || n & u && 0 === s;
|
|
1292
|
+
return l;
|
|
1293
|
+
}
|
|
1294
|
+
},
|
|
1295
|
+
476: (e, t, n)=>{
|
|
1296
|
+
e.exports = isexe;
|
|
1297
|
+
isexe.sync = sync;
|
|
1298
|
+
var r = n(147);
|
|
1299
|
+
function checkPathExt(e, t) {
|
|
1300
|
+
var n = void 0 !== t.pathExt ? t.pathExt : process.env.PATHEXT;
|
|
1301
|
+
if (!n) return true;
|
|
1302
|
+
n = n.split(";");
|
|
1303
|
+
if (-1 !== n.indexOf("")) return true;
|
|
1304
|
+
for(var r = 0; r < n.length; r++){
|
|
1305
|
+
var o = n[r].toLowerCase();
|
|
1306
|
+
if (o && e.substr(-o.length).toLowerCase() === o) return true;
|
|
1307
|
+
}
|
|
1308
|
+
return false;
|
|
1309
|
+
}
|
|
1310
|
+
function checkStat(e, t, n) {
|
|
1311
|
+
if (!e.isSymbolicLink() && !e.isFile()) return false;
|
|
1312
|
+
return checkPathExt(t, n);
|
|
1313
|
+
}
|
|
1314
|
+
function isexe(e, t, n) {
|
|
1315
|
+
r.stat(e, function(r, o) {
|
|
1316
|
+
n(r, r ? false : checkStat(o, e, t));
|
|
1317
|
+
});
|
|
1318
|
+
}
|
|
1319
|
+
function sync(e, t) {
|
|
1320
|
+
return checkStat(r.statSync(e), e, t);
|
|
1321
|
+
}
|
|
1322
|
+
},
|
|
1323
|
+
853: (e, t, n)=>{
|
|
1324
|
+
"use strict";
|
|
1325
|
+
const { PassThrough: r } = n(781);
|
|
1326
|
+
e.exports = function() {
|
|
1327
|
+
var e = [];
|
|
1328
|
+
var t = new r({
|
|
1329
|
+
objectMode: true
|
|
1330
|
+
});
|
|
1331
|
+
t.setMaxListeners(0);
|
|
1332
|
+
t.add = add;
|
|
1333
|
+
t.isEmpty = isEmpty;
|
|
1334
|
+
t.on("unpipe", remove);
|
|
1335
|
+
Array.prototype.slice.call(arguments).forEach(add);
|
|
1336
|
+
return t;
|
|
1337
|
+
function add(n) {
|
|
1338
|
+
if (Array.isArray(n)) {
|
|
1339
|
+
n.forEach(add);
|
|
1340
|
+
return this;
|
|
1341
|
+
}
|
|
1342
|
+
e.push(n);
|
|
1343
|
+
n.once("end", remove.bind(null, n));
|
|
1344
|
+
n.once("error", t.emit.bind(t, "error"));
|
|
1345
|
+
n.pipe(t, {
|
|
1346
|
+
end: false
|
|
1347
|
+
});
|
|
1348
|
+
return this;
|
|
1349
|
+
}
|
|
1350
|
+
function isEmpty() {
|
|
1351
|
+
return 0 == e.length;
|
|
1352
|
+
}
|
|
1353
|
+
function remove(n) {
|
|
1354
|
+
e = e.filter(function(e) {
|
|
1355
|
+
return e !== n;
|
|
1356
|
+
});
|
|
1357
|
+
if (!e.length && t.readable) t.end();
|
|
1358
|
+
}
|
|
1359
|
+
};
|
|
1360
|
+
},
|
|
1361
|
+
693: (e)=>{
|
|
1362
|
+
"use strict";
|
|
1363
|
+
const mimicFn = (e, t)=>{
|
|
1364
|
+
for (const n of Reflect.ownKeys(t))Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(t, n));
|
|
1365
|
+
return e;
|
|
1366
|
+
};
|
|
1367
|
+
e.exports = mimicFn;
|
|
1368
|
+
e.exports["default"] = mimicFn;
|
|
1369
|
+
},
|
|
1370
|
+
136: (e, t, n)=>{
|
|
1371
|
+
"use strict";
|
|
1372
|
+
const r = n(17);
|
|
1373
|
+
const o = n(460);
|
|
1374
|
+
const npmRunPath = (e)=>{
|
|
1375
|
+
e = {
|
|
1376
|
+
cwd: process.cwd(),
|
|
1377
|
+
path: process.env[o()],
|
|
1378
|
+
execPath: process.execPath,
|
|
1379
|
+
...e
|
|
1380
|
+
};
|
|
1381
|
+
let t;
|
|
1382
|
+
let n = r.resolve(e.cwd);
|
|
1383
|
+
const s = [];
|
|
1384
|
+
while(t !== n){
|
|
1385
|
+
s.push(r.join(n, "node_modules/.bin"));
|
|
1386
|
+
t = n;
|
|
1387
|
+
n = r.resolve(n, "..");
|
|
1388
|
+
}
|
|
1389
|
+
const i = r.resolve(e.cwd, e.execPath, "..");
|
|
1390
|
+
s.push(i);
|
|
1391
|
+
return s.concat(e.path).join(r.delimiter);
|
|
1392
|
+
};
|
|
1393
|
+
e.exports = npmRunPath;
|
|
1394
|
+
e.exports["default"] = npmRunPath;
|
|
1395
|
+
e.exports.env = (t)=>{
|
|
1396
|
+
t = {
|
|
1397
|
+
env: process.env,
|
|
1398
|
+
...t
|
|
1399
|
+
};
|
|
1400
|
+
const n = {
|
|
1401
|
+
...t.env
|
|
1402
|
+
};
|
|
1403
|
+
const r = o({
|
|
1404
|
+
env: n
|
|
1405
|
+
});
|
|
1406
|
+
t.path = n[r];
|
|
1407
|
+
n[r] = e.exports(t);
|
|
1408
|
+
return n;
|
|
1409
|
+
};
|
|
1410
|
+
},
|
|
1411
|
+
591: (e, t, n)=>{
|
|
1412
|
+
"use strict";
|
|
1413
|
+
const r = n(693);
|
|
1414
|
+
const o = new WeakMap;
|
|
1415
|
+
const onetime = (e, t = {})=>{
|
|
1416
|
+
if ("function" != typeof e) throw new TypeError("Expected a function");
|
|
1417
|
+
let n;
|
|
1418
|
+
let s = 0;
|
|
1419
|
+
const i = e.displayName || e.name || "<anonymous>";
|
|
1420
|
+
const onetime = function(...r) {
|
|
1421
|
+
o.set(onetime, ++s);
|
|
1422
|
+
if (1 === s) {
|
|
1423
|
+
n = e.apply(this, r);
|
|
1424
|
+
e = null;
|
|
1425
|
+
} else if (true === t.throw) throw new Error(`Function \`${i}\` can only be called once`);
|
|
1426
|
+
return n;
|
|
1427
|
+
};
|
|
1428
|
+
r(onetime, e);
|
|
1429
|
+
o.set(onetime, s);
|
|
1430
|
+
return onetime;
|
|
1431
|
+
};
|
|
1432
|
+
e.exports = onetime;
|
|
1433
|
+
e.exports["default"] = onetime;
|
|
1434
|
+
e.exports.callCount = (e)=>{
|
|
1435
|
+
if (!o.has(e)) throw new Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);
|
|
1436
|
+
return o.get(e);
|
|
1437
|
+
};
|
|
1438
|
+
},
|
|
1439
|
+
460: (e)=>{
|
|
1440
|
+
"use strict";
|
|
1441
|
+
const pathKey = (e = {})=>{
|
|
1442
|
+
const t = e.env || process.env;
|
|
1443
|
+
const n = e.platform || process.platform;
|
|
1444
|
+
if ("win32" !== n) return "PATH";
|
|
1445
|
+
return Object.keys(t).reverse().find((e)=>"PATH" === e.toUpperCase()) || "Path";
|
|
1446
|
+
};
|
|
1447
|
+
e.exports = pathKey;
|
|
1448
|
+
e.exports["default"] = pathKey;
|
|
1449
|
+
},
|
|
1450
|
+
256: (e, t, n)=>{
|
|
1451
|
+
"use strict";
|
|
1452
|
+
const r = n(609);
|
|
1453
|
+
e.exports = (e = "")=>{
|
|
1454
|
+
const t = e.match(r);
|
|
1455
|
+
if (!t) return null;
|
|
1456
|
+
const [n, o] = t[0].replace(/#! ?/, "").split(" ");
|
|
1457
|
+
const s = n.split("/").pop();
|
|
1458
|
+
if ("env" === s) return o;
|
|
1459
|
+
return o ? `${s} ${o}` : s;
|
|
1460
|
+
};
|
|
1461
|
+
},
|
|
1462
|
+
609: (e)=>{
|
|
1463
|
+
"use strict";
|
|
1464
|
+
e.exports = /^#!(.*)/;
|
|
1465
|
+
},
|
|
1466
|
+
580: (e, t, n)=>{
|
|
1467
|
+
var r = global.process;
|
|
1468
|
+
const processOk = function(e) {
|
|
1469
|
+
return e && "object" == typeof e && "function" == typeof e.removeListener && "function" == typeof e.emit && "function" == typeof e.reallyExit && "function" == typeof e.listeners && "function" == typeof e.kill && "number" == typeof e.pid && "function" == typeof e.on;
|
|
1470
|
+
};
|
|
1471
|
+
if (processOk(r)) {
|
|
1472
|
+
var o = n(491);
|
|
1473
|
+
var s = n(357);
|
|
1474
|
+
var i = /^win/i.test(r.platform);
|
|
1475
|
+
var a = n(361);
|
|
1476
|
+
if ("function" != typeof a) a = a.EventEmitter;
|
|
1477
|
+
var c;
|
|
1478
|
+
if (r.__signal_exit_emitter__) c = r.__signal_exit_emitter__;
|
|
1479
|
+
else {
|
|
1480
|
+
c = r.__signal_exit_emitter__ = new a;
|
|
1481
|
+
c.count = 0;
|
|
1482
|
+
c.emitted = {};
|
|
1483
|
+
}
|
|
1484
|
+
if (!c.infinite) {
|
|
1485
|
+
c.setMaxListeners(1 / 0);
|
|
1486
|
+
c.infinite = true;
|
|
1487
|
+
}
|
|
1488
|
+
e.exports = function(e, t) {
|
|
1489
|
+
if (!processOk(global.process)) return function() {};
|
|
1490
|
+
o.equal(typeof e, "function", "a callback must be provided for exit handler");
|
|
1491
|
+
if (false === f) p();
|
|
1492
|
+
var n = "exit";
|
|
1493
|
+
if (t && t.alwaysLast) n = "afterexit";
|
|
1494
|
+
var remove = function() {
|
|
1495
|
+
c.removeListener(n, e);
|
|
1496
|
+
if (0 === c.listeners("exit").length && 0 === c.listeners("afterexit").length) d();
|
|
1497
|
+
};
|
|
1498
|
+
c.on(n, e);
|
|
1499
|
+
return remove;
|
|
1500
|
+
};
|
|
1501
|
+
var d = function() {
|
|
1502
|
+
if (!f || !processOk(global.process)) return;
|
|
1503
|
+
f = false;
|
|
1504
|
+
s.forEach(function(e) {
|
|
1505
|
+
try {
|
|
1506
|
+
r.removeListener(e, l[e]);
|
|
1507
|
+
} catch (e) {}
|
|
1508
|
+
});
|
|
1509
|
+
r.emit = x;
|
|
1510
|
+
r.reallyExit = m;
|
|
1511
|
+
c.count -= 1;
|
|
1512
|
+
};
|
|
1513
|
+
e.exports.unload = d;
|
|
1514
|
+
var u = function(e, t, n) {
|
|
1515
|
+
if (c.emitted[e]) return;
|
|
1516
|
+
c.emitted[e] = true;
|
|
1517
|
+
c.emit(e, t, n);
|
|
1518
|
+
};
|
|
1519
|
+
var l = {};
|
|
1520
|
+
s.forEach(function(e) {
|
|
1521
|
+
l[e] = function() {
|
|
1522
|
+
if (!processOk(global.process)) return;
|
|
1523
|
+
var t = r.listeners(e);
|
|
1524
|
+
if (t.length === c.count) {
|
|
1525
|
+
d();
|
|
1526
|
+
u("exit", null, e);
|
|
1527
|
+
u("afterexit", null, e);
|
|
1528
|
+
if (i && "SIGHUP" === e) e = "SIGINT";
|
|
1529
|
+
r.kill(r.pid, e);
|
|
1530
|
+
}
|
|
1531
|
+
};
|
|
1532
|
+
});
|
|
1533
|
+
e.exports.signals = function() {
|
|
1534
|
+
return s;
|
|
1535
|
+
};
|
|
1536
|
+
var f = false;
|
|
1537
|
+
var p = function() {
|
|
1538
|
+
if (f || !processOk(global.process)) return;
|
|
1539
|
+
f = true;
|
|
1540
|
+
c.count += 1;
|
|
1541
|
+
s = s.filter(function(e) {
|
|
1542
|
+
try {
|
|
1543
|
+
r.on(e, l[e]);
|
|
1544
|
+
return true;
|
|
1545
|
+
} catch (e) {
|
|
1546
|
+
return false;
|
|
1547
|
+
}
|
|
1548
|
+
});
|
|
1549
|
+
r.emit = h;
|
|
1550
|
+
r.reallyExit = g;
|
|
1551
|
+
};
|
|
1552
|
+
e.exports.load = p;
|
|
1553
|
+
var m = r.reallyExit;
|
|
1554
|
+
var g = function(e) {
|
|
1555
|
+
if (!processOk(global.process)) return;
|
|
1556
|
+
r.exitCode = e || 0;
|
|
1557
|
+
u("exit", r.exitCode, null);
|
|
1558
|
+
u("afterexit", r.exitCode, null);
|
|
1559
|
+
m.call(r, r.exitCode);
|
|
1560
|
+
};
|
|
1561
|
+
var x = r.emit;
|
|
1562
|
+
var h = function(e, t) {
|
|
1563
|
+
if (!("exit" === e && processOk(global.process))) return x.apply(this, arguments);
|
|
1564
|
+
if (void 0 !== t) r.exitCode = t;
|
|
1565
|
+
var n = x.apply(this, arguments);
|
|
1566
|
+
u("exit", r.exitCode, null);
|
|
1567
|
+
u("afterexit", r.exitCode, null);
|
|
1568
|
+
return n;
|
|
1569
|
+
};
|
|
1570
|
+
} else e.exports = function() {
|
|
1571
|
+
return function() {};
|
|
1572
|
+
};
|
|
1573
|
+
},
|
|
1574
|
+
357: (e)=>{
|
|
1575
|
+
e.exports = [
|
|
1576
|
+
"SIGABRT",
|
|
1577
|
+
"SIGALRM",
|
|
1578
|
+
"SIGHUP",
|
|
1579
|
+
"SIGINT",
|
|
1580
|
+
"SIGTERM"
|
|
1581
|
+
];
|
|
1582
|
+
if ("win32" !== process.platform) e.exports.push("SIGVTALRM", "SIGXCPU", "SIGXFSZ", "SIGUSR2", "SIGTRAP", "SIGSYS", "SIGQUIT", "SIGIOT");
|
|
1583
|
+
if ("linux" === process.platform) e.exports.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT", "SIGUNUSED");
|
|
1584
|
+
},
|
|
1585
|
+
133: (e)=>{
|
|
1586
|
+
"use strict";
|
|
1587
|
+
e.exports = (e)=>{
|
|
1588
|
+
const t = "string" == typeof e ? "\n" : "\n".charCodeAt();
|
|
1589
|
+
const n = "string" == typeof e ? "\r" : "\r".charCodeAt();
|
|
1590
|
+
if (e[e.length - 1] === t) e = e.slice(0, e.length - 1);
|
|
1591
|
+
if (e[e.length - 1] === n) e = e.slice(0, e.length - 1);
|
|
1592
|
+
return e;
|
|
1593
|
+
};
|
|
1594
|
+
},
|
|
1595
|
+
85: (e, t, n)=>{
|
|
1596
|
+
const r = "win32" === process.platform || "cygwin" === process.env.OSTYPE || "msys" === process.env.OSTYPE;
|
|
1597
|
+
const o = n(17);
|
|
1598
|
+
const s = r ? ";" : ":";
|
|
1599
|
+
const i = n(212);
|
|
1600
|
+
const getNotFoundError = (e)=>Object.assign(new Error(`not found: ${e}`), {
|
|
1601
|
+
code: "ENOENT"
|
|
1602
|
+
});
|
|
1603
|
+
const getPathInfo = (e, t)=>{
|
|
1604
|
+
const n = t.colon || s;
|
|
1605
|
+
const o = e.match(/\//) || r && e.match(/\\/) ? [
|
|
1606
|
+
""
|
|
1607
|
+
] : [
|
|
1608
|
+
...r ? [
|
|
1609
|
+
process.cwd()
|
|
1610
|
+
] : [],
|
|
1611
|
+
...(t.path || process.env.PATH || "").split(n)
|
|
1612
|
+
];
|
|
1613
|
+
const i = r ? t.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "";
|
|
1614
|
+
const a = r ? i.split(n) : [
|
|
1615
|
+
""
|
|
1616
|
+
];
|
|
1617
|
+
if (r) {
|
|
1618
|
+
if (-1 !== e.indexOf(".") && "" !== a[0]) a.unshift("");
|
|
1619
|
+
}
|
|
1620
|
+
return {
|
|
1621
|
+
pathEnv: o,
|
|
1622
|
+
pathExt: a,
|
|
1623
|
+
pathExtExe: i
|
|
1624
|
+
};
|
|
1625
|
+
};
|
|
1626
|
+
const which = (e, t, n)=>{
|
|
1627
|
+
if ("function" == typeof t) {
|
|
1628
|
+
n = t;
|
|
1629
|
+
t = {};
|
|
1630
|
+
}
|
|
1631
|
+
if (!t) t = {};
|
|
1632
|
+
const { pathEnv: r, pathExt: s, pathExtExe: a } = getPathInfo(e, t);
|
|
1633
|
+
const c = [];
|
|
1634
|
+
const step = (n)=>new Promise((s, i)=>{
|
|
1635
|
+
if (n === r.length) return t.all && c.length ? s(c) : i(getNotFoundError(e));
|
|
1636
|
+
const a = r[n];
|
|
1637
|
+
const d = /^".*"$/.test(a) ? a.slice(1, -1) : a;
|
|
1638
|
+
const u = o.join(d, e);
|
|
1639
|
+
const l = !d && /^\.[\\\/]/.test(e) ? e.slice(0, 2) + u : u;
|
|
1640
|
+
s(subStep(l, n, 0));
|
|
1641
|
+
});
|
|
1642
|
+
const subStep = (e, n, r)=>new Promise((o, d)=>{
|
|
1643
|
+
if (r === s.length) return o(step(n + 1));
|
|
1644
|
+
const u = s[r];
|
|
1645
|
+
i(e + u, {
|
|
1646
|
+
pathExt: a
|
|
1647
|
+
}, (s, i)=>{
|
|
1648
|
+
if (!s && i) if (!t.all) return o(e + u);
|
|
1649
|
+
else c.push(e + u);
|
|
1650
|
+
return o(subStep(e, n, r + 1));
|
|
1651
|
+
});
|
|
1652
|
+
});
|
|
1653
|
+
return n ? step(0).then((e)=>n(null, e), n) : step(0);
|
|
1654
|
+
};
|
|
1655
|
+
const whichSync = (e, t)=>{
|
|
1656
|
+
t = t || {};
|
|
1657
|
+
const { pathEnv: n, pathExt: r, pathExtExe: s } = getPathInfo(e, t);
|
|
1658
|
+
const a = [];
|
|
1659
|
+
for(let c = 0; c < n.length; c++){
|
|
1660
|
+
const d = n[c];
|
|
1661
|
+
const u = /^".*"$/.test(d) ? d.slice(1, -1) : d;
|
|
1662
|
+
const l = o.join(u, e);
|
|
1663
|
+
const f = !u && /^\.[\\\/]/.test(e) ? e.slice(0, 2) + l : l;
|
|
1664
|
+
for(let e = 0; e < r.length; e++){
|
|
1665
|
+
const n = f + r[e];
|
|
1666
|
+
try {
|
|
1667
|
+
const e = i.sync(n, {
|
|
1668
|
+
pathExt: s
|
|
1669
|
+
});
|
|
1670
|
+
if (e) if (!t.all) return n;
|
|
1671
|
+
else a.push(n);
|
|
1672
|
+
} catch (e) {}
|
|
1673
|
+
}
|
|
1674
|
+
}
|
|
1675
|
+
if (t.all && a.length) return a;
|
|
1676
|
+
if (t.nothrow) return null;
|
|
1677
|
+
throw getNotFoundError(e);
|
|
1678
|
+
};
|
|
1679
|
+
e.exports = which;
|
|
1680
|
+
which.sync = whichSync;
|
|
1681
|
+
},
|
|
1682
|
+
491: (e)=>{
|
|
1683
|
+
"use strict";
|
|
1684
|
+
e.exports = require("assert");
|
|
1685
|
+
},
|
|
1686
|
+
300: (e)=>{
|
|
1687
|
+
"use strict";
|
|
1688
|
+
e.exports = require("buffer");
|
|
1689
|
+
},
|
|
1690
|
+
81: (e)=>{
|
|
1691
|
+
"use strict";
|
|
1692
|
+
e.exports = require("child_process");
|
|
1693
|
+
},
|
|
1694
|
+
361: (e)=>{
|
|
1695
|
+
"use strict";
|
|
1696
|
+
e.exports = require("events");
|
|
1697
|
+
},
|
|
1698
|
+
147: (e)=>{
|
|
1699
|
+
"use strict";
|
|
1700
|
+
e.exports = require("fs");
|
|
1701
|
+
},
|
|
1702
|
+
37: (e)=>{
|
|
1703
|
+
"use strict";
|
|
1704
|
+
e.exports = require("os");
|
|
1705
|
+
},
|
|
1706
|
+
17: (e)=>{
|
|
1707
|
+
"use strict";
|
|
1708
|
+
e.exports = require("path");
|
|
1709
|
+
},
|
|
1710
|
+
781: (e)=>{
|
|
1711
|
+
"use strict";
|
|
1712
|
+
e.exports = require("stream");
|
|
1713
|
+
},
|
|
1714
|
+
837: (e)=>{
|
|
1715
|
+
"use strict";
|
|
1716
|
+
e.exports = require("util");
|
|
1717
|
+
}
|
|
1718
|
+
};
|
|
1719
|
+
var t = {};
|
|
1720
|
+
function __nccwpck_require__(n) {
|
|
1721
|
+
var r = t[n];
|
|
1722
|
+
if (void 0 !== r) return r.exports;
|
|
1723
|
+
var o = t[n] = {
|
|
1724
|
+
exports: {}
|
|
1725
|
+
};
|
|
1726
|
+
var s = true;
|
|
1727
|
+
try {
|
|
1728
|
+
e[n](o, o.exports, __nccwpck_require__);
|
|
1729
|
+
s = false;
|
|
1730
|
+
} finally{
|
|
1731
|
+
if (s) delete t[n];
|
|
1732
|
+
}
|
|
1733
|
+
return o.exports;
|
|
1734
|
+
}
|
|
1735
|
+
if (void 0 !== __nccwpck_require__) __nccwpck_require__.ab = __dirname + "/";
|
|
1736
|
+
var n = __nccwpck_require__(632);
|
|
1737
|
+
module.exports = n;
|
|
1738
|
+
})();
|