@sma1lboy/rove 0.9.188 → 0.9.190

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.
Files changed (44) hide show
  1. package/dist/cli/{chunk-kffgmnfz.js → chunk-0pazt6mk.js} +1 -1
  2. package/dist/cli/{chunk-1xrry8mn.js → chunk-0rsjdc2p.js} +1 -1
  3. package/dist/cli/{chunk-9bbrbgf9.js → chunk-0waq0d0k.js} +1 -1
  4. package/dist/cli/{chunk-262x4qr9.js → chunk-16rt509n.js} +1 -1
  5. package/dist/cli/{chunk-8ybpxrbt.js → chunk-18rdsr2j.js} +1 -1
  6. package/dist/cli/{chunk-9xvzjs9d.js → chunk-1mdah6n8.js} +1 -1
  7. package/dist/cli/{chunk-mme4hff3.js → chunk-2w9pqcc3.js} +1 -1
  8. package/dist/cli/{chunk-n64paahm.js → chunk-61ak2y9n.js} +4 -4
  9. package/dist/cli/chunk-86938f2g.js +4 -0
  10. package/dist/cli/{chunk-q3rf6gkh.js → chunk-8s5yzt7z.js} +2 -2
  11. package/dist/cli/{chunk-511csjr9.js → chunk-9nngww22.js} +2 -2
  12. package/dist/cli/{chunk-j6pvrkh1.js → chunk-ar48zb4b.js} +1 -1
  13. package/dist/cli/{chunk-8a080b82.js → chunk-bveqt1bn.js} +1 -1
  14. package/dist/cli/{chunk-6brqrpqa.js → chunk-c2aqag1z.js} +1 -1
  15. package/dist/cli/{chunk-49ykmne0.js → chunk-d3qmrnc6.js} +1 -1
  16. package/dist/cli/{chunk-yrmj16b9.js → chunk-dc8hk7a7.js} +1 -1
  17. package/dist/cli/{chunk-1g7e29sv.js → chunk-ectyq178.js} +1 -1
  18. package/dist/cli/{chunk-0cm7e5qg.js → chunk-ex0tesmv.js} +1 -1
  19. package/dist/cli/{chunk-g7bp57ge.js → chunk-f01z7hw8.js} +1 -1
  20. package/dist/cli/{chunk-1f071tjz.js → chunk-f62n9xqs.js} +1 -1
  21. package/dist/cli/{chunk-1qbgvkpy.js → chunk-gc1x5v4n.js} +1 -1
  22. package/dist/cli/{chunk-gq4nkteg.js → chunk-h3gqr77q.js} +1 -1
  23. package/dist/cli/{chunk-nsg5dtyk.js → chunk-hm1fg4b1.js} +1 -1
  24. package/dist/cli/{chunk-wr2ynhkf.js → chunk-hz8ynrv6.js} +1 -1
  25. package/dist/cli/{chunk-eaa24va5.js → chunk-j6tmzwc9.js} +1 -1
  26. package/dist/cli/{chunk-n4bhegyh.js → chunk-jj4x05y6.js} +1 -1
  27. package/dist/cli/{chunk-9xyksvt2.js → chunk-mamm5f66.js} +1 -1
  28. package/dist/cli/{chunk-2f409xdj.js → chunk-mrszjfxd.js} +1 -1
  29. package/dist/cli/{chunk-15gxe843.js → chunk-myewhxvp.js} +1 -1
  30. package/dist/cli/{chunk-mw9qkt91.js → chunk-nk1d8t3a.js} +1 -1
  31. package/dist/cli/{chunk-qqd34s04.js → chunk-nn099hrx.js} +2 -2
  32. package/dist/cli/{chunk-r8vajxt3.js → chunk-p0zrjj7n.js} +3 -3
  33. package/dist/cli/{chunk-6n7n1vr7.js → chunk-p3stdyd2.js} +1 -1
  34. package/dist/cli/{chunk-gwxep0x4.js → chunk-p9gnqtfe.js} +1 -1
  35. package/dist/cli/{chunk-rgcr3gx6.js → chunk-pjk7jxjb.js} +1 -1
  36. package/dist/cli/{chunk-apkn54rn.js → chunk-vvyg65jf.js} +1 -1
  37. package/dist/cli/{chunk-t0swwy8z.js → chunk-w4y5cmbs.js} +1 -1
  38. package/dist/cli/{chunk-nwbbjkrj.js → chunk-w7a39tk8.js} +1 -1
  39. package/dist/cli/{chunk-qx2ph8jr.js → chunk-wm14aqwc.js} +1 -1
  40. package/dist/cli/index.js +3 -3
  41. package/dist/cli/kobe.js +1 -1
  42. package/dist/cli/rove.js +1 -1
  43. package/package.json +1 -1
  44. package/dist/cli/chunk-1jbznr12.js +0 -4
@@ -1,4 +0,0 @@
1
- // @bun
2
- import{engineEntry,identifiableEngineIds}from"./chunk-71k66b8f.js";import{PsProbeUnavailableError}from"./chunk-pxk2c2vj.js";import{__require}from"./chunk-wqfp8d9w.js";import{basename}from"path";var WRAPPERS=new Set(["node","bun","npx","deno","sh","zsh","bash","env","script"]);function binaryName(token){return basename(token).replace(/\.(exe|js|mjs|cjs)$/,"")}function executableNameFromArgv(argv){for(let token of argv.slice(0,8)){if(/^[A-Za-z_][A-Za-z0-9_]*=/.test(token))continue;let name=binaryName(token);if(WRAPPERS.has(name))continue;return name||null}return null}function vendorFromArgv(commandLine){let name=executableNameFromArgv(commandLine.trim().split(/\s+/));if(!name)return null;return identifiableEngineIds().find((v)=>{let entry=engineEntry(v);return entry.defaultCommand[0]===name||entry.processNames?.includes(name)===!0})??null}function parsePsSnapshot(text){let rows=[];for(let line of text.split(`
3
- `)){let m=/^\s*(\d+)\s+(\d+)\s+(\S.*)$/.exec(line);if(m)rows.push({pid:Number(m[1]),ppid:Number(m[2]),args:m[3]})}return rows}function childrenIndex(rows){let kids=new Map;for(let row of rows){let list=kids.get(row.ppid);if(list)list.push(row);else kids.set(row.ppid,[row])}return kids}function hasAncestor(rows,pid,ancestorPid){let parents=new Map(rows.map((r)=>[r.pid,r.ppid])),cur=pid;for(let hops=0;hops<=rows.length;hops++){if(cur===ancestorPid)return!0;let next=parents.get(cur);if(next===void 0||next<=1)return!1;cur=next}return!1}function foregroundEngineIn(rows,rootPid){let kids=childrenIndex(rows),queue=[...kids.get(rootPid)??[]];while(queue.length>0){let row=queue.shift();if(!row)break;let vendor=vendorFromArgv(row.args);if(vendor)return{vendor,argv:row.args,pid:row.pid};queue.push(...kids.get(row.pid)??[])}return null}function engineProcessIn(rows,rootPid,extraLaunch){if(foregroundEngineIn(rows,rootPid))return!0;let expected=extraLaunch?executableNameFromArgv(typeof extraLaunch==="string"?[extraLaunch]:extraLaunch):null;if(!expected)return!1;let kids=childrenIndex(rows),queue=[...kids.get(rootPid)??[]];while(queue.length>0){let row=queue.shift();if(!row)break;if(executableNameFromArgv(row.args.trim().split(/\s+/))===expected)return!0;queue.push(...kids.get(row.pid)??[])}return!1}var PS_PROBE_TIMEOUT_MS=5000,bunPsSpawn=()=>{let proc=Bun.spawn(["ps","-A","-o","pid=,ppid=,args="],{stdout:"pipe",stderr:"ignore"});return{text:new Response(proc.stdout).text(),kill:()=>proc.kill()}};async function psSnapshotWith(spawn,timeoutMs=PS_PROBE_TIMEOUT_MS){let proc=spawn(),timer;try{let text=await Promise.race([proc.text,new Promise((_resolve,reject)=>{timer=setTimeout(()=>{try{proc.kill()}catch{}reject(new PsProbeUnavailableError(`ps did not answer within ${timeoutMs}ms`))},timeoutMs)})]);if(parsePsSnapshot(text).length===0)throw new PsProbeUnavailableError("ps returned no usable rows");return text}finally{if(timer)clearTimeout(timer)}}var psSnapshot=async(anchors)=>{if(process.platform!=="win32")return psSnapshotWith(bunPsSpawn);let{defaultWinProcessProbe,winProcessSnapshot}=await import("./chunk-hses07jj.js");return winProcessSnapshot(anchors??[],defaultWinProcessProbe())};async function foregroundEngine(rootPid,snapshot=psSnapshot){try{return foregroundEngineIn(parsePsSnapshot(await snapshot([rootPid])),rootPid)}catch{return null}}
4
- export{vendorFromArgv,parsePsSnapshot,hasAncestor,foregroundEngineIn,engineProcessIn,PS_PROBE_TIMEOUT_MS,psSnapshotWith,psSnapshot,foregroundEngine};