var p=Object.defineProperty;var t=(e,n)=>p(e,"name",{value:n,configurable:!0});import g from"node:net";import{g as u}from"./get-pipe-path-_tAJyU_v.mjs";let o=[];const m=t(()=>new Promise(e=>{const n=u(process.ppid),r=g.createConnection(n,()=>{e(t(i=>{const c=Buffer.from(JSON.stringify(i)),f=Buffer.alloc(4);f.writeInt32BE(c.length,0),r.write(Buffer.concat([f,c]))},"sendToParent"))});r.on("error",()=>{e()}),r.unref()}),"connectToServer"),s={send:t(e=>{o.push(e)},"send")},a=m();a.then(e=>{if(e)for(const n of o)e(n);o=[],s.send=e},()=>{o=[],s.send=void 0});export{a as c,s as p};
