var f=Object.defineProperty;var c=(t,r)=>f(t,"name",{value:r,configurable:!0});import{r as g}from"./get-pipe-path-_tAJyU_v.mjs";import{constants as m}from"node:os";import{isMainThread as h}from"node:worker_threads";import{c as H}from"./client-D_mPDF5S.mjs";import"./suppress-warnings.mjs";import"module";import"node:path";import"./temporary-directory-BDDVQOvU.mjs";import"node:net";const y=c((t,r)=>{const i=new Map;for(const e of t){const n=c(s=>{r(s),process.listenerCount(e)===0&&process.exit(128+m.signals[e])},"hiddenHandler");process.prependListener(e,n),i.set(e,n)}const{listenerCount:l,listeners:p}=process;process.listenerCount=function(e){let n=Reflect.apply(l,this,arguments);const s=i.get(e),o=arguments[1],a=l.length===1||arguments.length<2||o===void 0||o===null;if(s&&(a||o===s)){const d=Reflect.apply(p,this,[e]).filter(u=>u===s).length;n-=d}return n},process.listeners=function(e){const n=Reflect.apply(p,this,arguments);return t.includes(e)?n.filter(s=>s!==i.get(e)):n}},"bindHiddenSignalsHandler");h&&(g("./cjs/index.cjs"),(async()=>{const t=await H;t&&y(["SIGINT","SIGTERM"],r=>{t({type:"signal",signal:r})})})());
