pyre-cli 10.2.0 → 10.4.0

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 (88) hide show
  1. package/README.md +75 -18
  2. package/dist/{alertChannels-TPSQIJ7S.js → alertChannels-MNX4XH6J.js} +1 -0
  3. package/dist/{anomaliesCmd-25OFKYPK.js → anomaliesCmd-HHTY5LYL.js} +2 -0
  4. package/dist/benchGitCmd-HIXUC5EK.js +87 -0
  5. package/dist/{benchmarkCmd-A3ETK6VY.js → benchmarkCmd-B7DLP2VC.js} +2 -0
  6. package/dist/{blender-FGH3ASEQ.js → blender-6ZX5SPYC.js} +3 -1
  7. package/dist/{brewHealth-P2GW5Y5C.js → brewHealth-VFW33QB3.js} +1 -0
  8. package/dist/budgetCmd-TGO3RYLN.js +11 -0
  9. package/dist/{buildCmd-CDPZ2ZFA.js → buildCmd-E7KUCFYG.js} +3 -1
  10. package/dist/{checkCmd-WQAHAUWO.js → checkCmd-QLYTP77Y.js} +5 -3
  11. package/dist/chunk-3RG5ZIWI.js +10 -0
  12. package/dist/{chunk-VIACN2RU.js → chunk-FYCBGUTW.js} +41 -19
  13. package/dist/chunk-JH7P6KLN.js +143 -0
  14. package/dist/{chunk-QM5L43EK.js → chunk-LDJB5V4N.js} +5 -1
  15. package/dist/chunk-NMGQVRCA.js +111 -0
  16. package/dist/chunk-OCL7P7N7.js +936 -0
  17. package/dist/{chunk-23YWCI3O.js → chunk-QEH4LR6P.js} +28 -686
  18. package/dist/{chunk-KVUMOA6C.js → chunk-RKPGPVTO.js} +77 -4
  19. package/dist/chunk-UF3XQ3R3.js +3800 -0
  20. package/dist/{collectors-JDN5Y7EV.js → collectors-V7SCIIDH.js} +5 -3
  21. package/dist/{completions-ZVTNE52B.js → completions-FTPXDSR2.js} +44 -3
  22. package/dist/{config-J4YMADEF.js → config-5WW5M63G.js} +2 -1
  23. package/dist/containersCmd-FSMYOBG2.js +84 -0
  24. package/dist/{doctor-LHFW4UJP.js → doctor-O4DIAMHK.js} +3 -2
  25. package/dist/{explainCmd-MF6PIMLW.js → explainCmd-7PBPA7O5.js} +1 -0
  26. package/dist/{extensions-XJGHG7X3.js → extensions-QQEV7U3D.js} +1 -0
  27. package/dist/{firebaseSync-ON3RZ6KX.js → firebaseSync-LRN67UTV.js} +2 -0
  28. package/dist/flightRecorder-GJIAQOXC.js +162 -0
  29. package/dist/index.js +737 -4125
  30. package/dist/inspectCmd-5FXJBJTK.js +137 -0
  31. package/dist/menu-AJFGDLBP.js +1233 -0
  32. package/dist/monitors/platform/windows-ui.ps1 +31 -29
  33. package/dist/{netUsageCmd-67IBZZYN.js → netUsageCmd-JP6YKBPF.js} +7 -5
  34. package/dist/optimizeCmd-WZKLFYZU.js +1110 -0
  35. package/dist/{pipeCmd-2N4JPKYE.js → pipeCmd-CPK6FVKB.js} +5 -3
  36. package/dist/playbookCmd-FRROIEXR.js +145 -0
  37. package/dist/{profileProcCmd-N4H6MCBT.js → profileProcCmd-5Y3733E7.js} +64 -13
  38. package/dist/{prometheus-5BL5PVLC.js → prometheus-CYNUR3QT.js} +1 -0
  39. package/dist/{prometheusCmd-LEUM5WCZ.js → prometheusCmd-G2CSEZRQ.js} +5 -3
  40. package/dist/{replayCmd-Z3PYXY7V.js → replayCmd-ODB5SPOQ.js} +25 -6
  41. package/dist/{run-HOGQDDTA.js → run-UJQYT2TO.js} +1 -0
  42. package/dist/{serveCmd-L7LVJOZN.js → serveCmd-KDPWLVQI.js} +5 -3
  43. package/dist/{service-7GIX3YNC.js → service-LIYYR3UI.js} +1 -0
  44. package/dist/{smartCmd-ODWKSFNG.js → smartCmd-2BJJ37GV.js} +130 -5
  45. package/dist/statuslineCmd-EUKYRR2G.js +75 -0
  46. package/dist/{stressCmd-MFXMFXYX.js → stressCmd-GKHGY26X.js} +2 -0
  47. package/dist/{syncCmd-42IRF633.js → syncCmd-MIBFKX24.js} +16 -5
  48. package/dist/topoCmd-RTXQJ6XA.js +189 -0
  49. package/dist/{updateCheck-52X6LJG5.js → updateCheck-LJHEMG3G.js} +2 -0
  50. package/dist/{watchdogCmd-6GR4UN6B.js → watchdogCmd-XM6OPTKM.js} +41 -6
  51. package/dist/{wizard-JQMQWFAW.js → wizard-PRDOJROQ.js} +2 -1
  52. package/package.json +2 -2
  53. package/src/benchGitCmd.ts +110 -0
  54. package/src/budgetCmd.ts +199 -0
  55. package/src/completions.ts +42 -3
  56. package/src/containersCmd.ts +106 -0
  57. package/src/doctor.ts +86 -6
  58. package/src/easy_features.test.ts +83 -0
  59. package/src/flightRecorder.ts +214 -0
  60. package/src/index.ts +183 -9
  61. package/src/inspectCmd.ts +165 -0
  62. package/src/live/input.ts +70 -3
  63. package/src/live/render.ts +1 -1
  64. package/src/live/state.ts +2 -1
  65. package/src/menu/commands.ts +754 -0
  66. package/src/menu/index.ts +358 -0
  67. package/src/menu/render.ts +272 -0
  68. package/src/menu/types.ts +63 -0
  69. package/src/menu.test.ts +110 -0
  70. package/src/monitors/blender.ts +49 -19
  71. package/src/monitors/buildTracker.ts +72 -54
  72. package/src/monitors/platform/windows-ui.ps1 +31 -29
  73. package/src/monitors/platform/windows.ts +613 -280
  74. package/src/optimizeCmd.ts +1248 -0
  75. package/src/platform.test.ts +135 -0
  76. package/src/playbookCmd.ts +156 -0
  77. package/src/power_features.test.ts +251 -0
  78. package/src/profileProcCmd.ts +68 -21
  79. package/src/replayCmd.ts +15 -6
  80. package/src/smartCmd.ts +149 -10
  81. package/src/state/config.ts +13 -0
  82. package/src/statuslineCmd.ts +87 -0
  83. package/src/syncCmd.ts +12 -0
  84. package/src/topoCmd.ts +83 -50
  85. package/src/watchdogCmd.ts +40 -3
  86. package/src/xbar.ts +195 -17
  87. package/dist/chunk-M73HCQD2.js +0 -95
  88. package/dist/topoCmd-DZ3YS5IL.js +0 -148
@@ -0,0 +1,111 @@
1
+ import {
2
+ collectWindowsProcesses
3
+ } from "./chunk-OCL7P7N7.js";
4
+ import {
5
+ run
6
+ } from "./chunk-MZO5QKUR.js";
7
+
8
+ // src/monitors/buildTracker.ts
9
+ async function collectBuilds() {
10
+ try {
11
+ const builds = /* @__PURE__ */ new Map();
12
+ const buildToolPatterns = [
13
+ { name: "msbuild", match: /\b(msbuild|devenv)\b/i },
14
+ { name: "xcodebuild", match: /xcodebuild/i },
15
+ { name: "cargo", match: /\bcargo\s+(build|check|test|run)?\b/i },
16
+ { name: "swift", match: /\bswift\s+(build|test)\b/i },
17
+ { name: "make", match: /\b(make|nmake)\b/i },
18
+ { name: "ninja", match: /\bninja\b/i },
19
+ { name: "cmake", match: /\bcmake\b/i },
20
+ { name: "bazel", match: /\bbazel\b/i },
21
+ { name: "go", match: /\bgo\s+(build|test|run)\b/i }
22
+ ];
23
+ const compilerMatch = /(clang|swift-frontend|rustc|go tool compile|gcc|g\+\+|ghc|cl\.exe|csc\.exe|link\.exe)/i;
24
+ const procList = [];
25
+ if (process.platform === "win32") {
26
+ const winProcs = await collectWindowsProcesses();
27
+ for (const p of winProcs) {
28
+ procList.push({
29
+ pid: p.pid,
30
+ cpu: p.cpu,
31
+ mem: p.mem,
32
+ elapsedSec: p.runtime || 0,
33
+ cmd: p.command
34
+ });
35
+ }
36
+ } else {
37
+ const raw = await run("ps -eo pid,ppid,pcpu,pmem,etime,command -r 2>/dev/null", "");
38
+ if (!raw) return [];
39
+ const lines = raw.split("\n").slice(1);
40
+ for (const line of lines) {
41
+ if (!line.trim()) continue;
42
+ const parts = line.trim().split(/\s+/);
43
+ if (parts.length < 6) continue;
44
+ const pid = parseInt(parts[0], 10);
45
+ const cpu = parseFloat(parts[2]) || 0;
46
+ const mem = parseFloat(parts[3]) || 0;
47
+ const etimeStr = parts[4];
48
+ const cmd = parts.slice(5).join(" ");
49
+ let elapsedSec = 0;
50
+ const etimeParts = etimeStr.split(":").map(Number);
51
+ if (etimeParts.length === 2) elapsedSec = etimeParts[0] * 60 + etimeParts[1];
52
+ else if (etimeParts.length === 3) elapsedSec = etimeParts[0] * 3600 + etimeParts[1] * 60 + etimeParts[2];
53
+ procList.push({ pid, cpu, mem, elapsedSec, cmd });
54
+ }
55
+ }
56
+ for (const p of procList) {
57
+ for (const pattern of buildToolPatterns) {
58
+ if (pattern.match.test(p.cmd)) {
59
+ builds.set(pattern.name, {
60
+ tool: pattern.name,
61
+ rootPid: p.pid,
62
+ command: p.cmd.slice(0, 80),
63
+ compilerProcesses: 1,
64
+ totalCpu: p.cpu,
65
+ totalMem: p.mem,
66
+ elapsedSec: p.elapsedSec,
67
+ target: p.cmd.split(" ").slice(1, 4).join(" ")
68
+ });
69
+ break;
70
+ }
71
+ }
72
+ }
73
+ for (const p of procList) {
74
+ if (compilerMatch.test(p.cmd)) {
75
+ if (builds.size > 0) {
76
+ const firstBuild = builds.values().next().value;
77
+ if (firstBuild) {
78
+ firstBuild.compilerProcesses += 1;
79
+ firstBuild.totalCpu += p.cpu;
80
+ firstBuild.totalMem += p.mem;
81
+ }
82
+ } else {
83
+ const key = "compiler";
84
+ const existing = builds.get(key);
85
+ if (existing) {
86
+ existing.compilerProcesses += 1;
87
+ existing.totalCpu += p.cpu;
88
+ existing.totalMem += p.mem;
89
+ } else {
90
+ builds.set(key, {
91
+ tool: "compiler",
92
+ rootPid: p.pid,
93
+ command: p.cmd.slice(0, 80),
94
+ compilerProcesses: 1,
95
+ totalCpu: p.cpu,
96
+ totalMem: p.mem,
97
+ elapsedSec: p.elapsedSec
98
+ });
99
+ }
100
+ }
101
+ }
102
+ }
103
+ return Array.from(builds.values());
104
+ } catch {
105
+ return [];
106
+ }
107
+ }
108
+
109
+ export {
110
+ collectBuilds
111
+ };