pyre-cli 10.5.0 → 10.6.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 (34) hide show
  1. package/dist/{blender-6ZX5SPYC.js → blender-OXH3PVYM.js} +3 -3
  2. package/dist/{brewHealth-VFW33QB3.js → brewHealth-JE4EZ63L.js} +1 -1
  3. package/dist/{buildCmd-E7KUCFYG.js → buildCmd-R6RY3XZR.js} +3 -3
  4. package/dist/{checkCmd-QLYTP77Y.js → checkCmd-KF6G77SC.js} +5 -5
  5. package/dist/{chunk-RKPGPVTO.js → chunk-2SUFLPIH.js} +5 -5
  6. package/dist/chunk-735X2GPS.js +88 -0
  7. package/dist/{chunk-QEH4LR6P.js → chunk-D3HWHU3X.js} +4 -4
  8. package/dist/{chunk-FYCBGUTW.js → chunk-GPSU54LZ.js} +2 -2
  9. package/dist/{chunk-NMGQVRCA.js → chunk-KLANOKZF.js} +2 -2
  10. package/dist/{chunk-OCL7P7N7.js → chunk-YXZ4XREM.js} +195 -111
  11. package/dist/{collectors-V7SCIIDH.js → collectors-DQEVTONN.js} +5 -5
  12. package/dist/{doctor-O4DIAMHK.js → doctor-SCHRYF6D.js} +2 -2
  13. package/dist/{extensions-QQEV7U3D.js → extensions-BWXMZVMN.js} +1 -1
  14. package/dist/{flightRecorder-GJIAQOXC.js → flightRecorder-J4TESP5M.js} +5 -5
  15. package/dist/index.js +55 -28
  16. package/dist/monitors/platform/windows-ui.ps1 +14 -4
  17. package/dist/{netUsageCmd-JP6YKBPF.js → netUsageCmd-2QVRC6FX.js} +5 -5
  18. package/dist/{optimizeCmd-WZKLFYZU.js → optimizeCmd-ZF7U3DXR.js} +2 -2
  19. package/dist/{pipeCmd-CPK6FVKB.js → pipeCmd-XBWAYRRU.js} +5 -5
  20. package/dist/{profileProcCmd-5Y3733E7.js → profileProcCmd-33YB4RXZ.js} +1 -1
  21. package/dist/{prometheusCmd-G2CSEZRQ.js → prometheusCmd-6PXZG73L.js} +5 -5
  22. package/dist/{run-UJQYT2TO.js → run-744KZ7CE.js} +1 -1
  23. package/dist/{serveCmd-KDPWLVQI.js → serveCmd-R2Y7O3XC.js} +5 -5
  24. package/dist/{smartCmd-2BJJ37GV.js → smartCmd-C33WRXA2.js} +1 -1
  25. package/dist/{statuslineCmd-EUKYRR2G.js → statuslineCmd-QPBGXC2G.js} +5 -5
  26. package/dist/{topoCmd-RTXQJ6XA.js → topoCmd-RVWFSPHE.js} +5 -5
  27. package/dist/{watchdogCmd-XM6OPTKM.js → watchdogCmd-346TXWWH.js} +6 -6
  28. package/package.json +1 -1
  29. package/src/index.ts +31 -2
  30. package/src/monitors/platform/windows-ui.ps1 +14 -4
  31. package/src/monitors/platform/windows.ts +176 -76
  32. package/src/monitors/run.ts +83 -7
  33. package/src/platform.test.ts +13 -0
  34. package/dist/chunk-MZO5QKUR.js +0 -32
package/dist/index.js CHANGED
@@ -7,10 +7,10 @@ import {
7
7
  } from "./chunk-KFPTD266.js";
8
8
  import {
9
9
  collectAll
10
- } from "./chunk-QEH4LR6P.js";
11
- import "./chunk-NMGQVRCA.js";
12
- import "./chunk-FYCBGUTW.js";
13
- import "./chunk-OCL7P7N7.js";
10
+ } from "./chunk-D3HWHU3X.js";
11
+ import "./chunk-KLANOKZF.js";
12
+ import "./chunk-GPSU54LZ.js";
13
+ import "./chunk-YXZ4XREM.js";
14
14
  import {
15
15
  sendAlert,
16
16
  sendTestAlert
@@ -40,8 +40,8 @@ import {
40
40
  } from "./chunk-ZLVIVFSO.js";
41
41
  import {
42
42
  runDoctor
43
- } from "./chunk-RKPGPVTO.js";
44
- import "./chunk-MZO5QKUR.js";
43
+ } from "./chunk-2SUFLPIH.js";
44
+ import "./chunk-735X2GPS.js";
45
45
  import {
46
46
  CONFIG_FILE,
47
47
  getConfigDir,
@@ -4190,7 +4190,7 @@ async function main() {
4190
4190
  }
4191
4191
  if (cmd === "flight") {
4192
4192
  const sub = program.args[1] || "dump";
4193
- const { runFlightCommand } = await import("./flightRecorder-GJIAQOXC.js");
4193
+ const { runFlightCommand } = await import("./flightRecorder-J4TESP5M.js");
4194
4194
  await runFlightCommand(sub, {
4195
4195
  out: opts.out,
4196
4196
  duration: opts.duration ? parseInt(opts.duration, 10) : void 0
@@ -4231,7 +4231,7 @@ async function main() {
4231
4231
  return;
4232
4232
  }
4233
4233
  if (cmd === "statusline") {
4234
- const { runStatuslineCommand } = await import("./statuslineCmd-EUKYRR2G.js");
4234
+ const { runStatuslineCommand } = await import("./statuslineCmd-QPBGXC2G.js");
4235
4235
  await runStatuslineCommand(opts.format || "plain");
4236
4236
  return;
4237
4237
  }
@@ -4253,7 +4253,7 @@ async function main() {
4253
4253
  return;
4254
4254
  }
4255
4255
  if (cmd === "check") {
4256
- const { runCheckCommand } = await import("./checkCmd-QLYTP77Y.js");
4256
+ const { runCheckCommand } = await import("./checkCmd-KF6G77SC.js");
4257
4257
  await runCheckCommand({
4258
4258
  exitCode: !!opts.exitCode,
4259
4259
  cpuAlertPct: config2.cpuAlertPct,
@@ -4263,7 +4263,7 @@ async function main() {
4263
4263
  return;
4264
4264
  }
4265
4265
  if (cmd === "pipe") {
4266
- const { runPipeCommand } = await import("./pipeCmd-CPK6FVKB.js");
4266
+ const { runPipeCommand } = await import("./pipeCmd-XBWAYRRU.js");
4267
4267
  const intervalSec = parseFloat(opts.interval) || 1;
4268
4268
  const samples = parseInt(opts.samples, 10) || 0;
4269
4269
  await runPipeCommand({
@@ -4286,12 +4286,12 @@ async function main() {
4286
4286
  return;
4287
4287
  }
4288
4288
  if (cmd === "extensions") {
4289
- const { printExtensionsReport } = await import("./extensions-QQEV7U3D.js");
4289
+ const { printExtensionsReport } = await import("./extensions-BWXMZVMN.js");
4290
4290
  await printExtensionsReport();
4291
4291
  return;
4292
4292
  }
4293
4293
  if (cmd === "blender") {
4294
- const { collectBlenderRenders } = await import("./blender-6ZX5SPYC.js");
4294
+ const { collectBlenderRenders } = await import("./blender-OXH3PVYM.js");
4295
4295
  const renders = await collectBlenderRenders();
4296
4296
  if (!renders.length) {
4297
4297
  console.log(chalk9.dim("No active Blender renders detected."));
@@ -4316,19 +4316,19 @@ async function main() {
4316
4316
  return;
4317
4317
  }
4318
4318
  if (cmd === "prometheus") {
4319
- const { runPrometheusServer } = await import("./prometheusCmd-G2CSEZRQ.js");
4319
+ const { runPrometheusServer } = await import("./prometheusCmd-6PXZG73L.js");
4320
4320
  const prometheusPort = parseInt(opts.prometheusPort, 10) || 9090;
4321
4321
  const intervalSec = parseFloat(opts.interval) || 15;
4322
4322
  await runPrometheusServer({ port: prometheusPort, interval: intervalSec, detailed: opts.detailed });
4323
4323
  return;
4324
4324
  }
4325
4325
  if (cmd === "smart") {
4326
- const { runSmartCommand } = await import("./smartCmd-2BJJ37GV.js");
4326
+ const { runSmartCommand } = await import("./smartCmd-C33WRXA2.js");
4327
4327
  await runSmartCommand();
4328
4328
  return;
4329
4329
  }
4330
4330
  if (cmd === "optimize") {
4331
- const { runOptimizeCommand } = await import("./optimizeCmd-WZKLFYZU.js");
4331
+ const { runOptimizeCommand } = await import("./optimizeCmd-ZF7U3DXR.js");
4332
4332
  await runOptimizeCommand(program.args[1], program.args.slice(2), {
4333
4333
  idle: opts.idle,
4334
4334
  keep: opts.keep,
@@ -4405,7 +4405,7 @@ async function main() {
4405
4405
  return;
4406
4406
  }
4407
4407
  if (cmd === "netusage") {
4408
- const { runNetUsageCommand } = await import("./netUsageCmd-JP6YKBPF.js");
4408
+ const { runNetUsageCommand } = await import("./netUsageCmd-2QVRC6FX.js");
4409
4409
  await runNetUsageCommand({
4410
4410
  top: opts.top ? parseInt(opts.top, 10) : 15,
4411
4411
  sort: opts.sort === "rx" || opts.sort === "tx" ? opts.sort : "total",
@@ -4414,7 +4414,7 @@ async function main() {
4414
4414
  return;
4415
4415
  }
4416
4416
  if (cmd === "serve") {
4417
- const { runServeCommand } = await import("./serveCmd-KDPWLVQI.js");
4417
+ const { runServeCommand } = await import("./serveCmd-R2Y7O3XC.js");
4418
4418
  const port = parseInt(opts.port, 10) || 8080;
4419
4419
  await runServeCommand({
4420
4420
  port,
@@ -4429,7 +4429,7 @@ async function main() {
4429
4429
  console.error(chalk9.red(" \u2716 Usage: pyre profile-proc <pid> [--duration <sec>]"));
4430
4430
  process.exit(1);
4431
4431
  }
4432
- const { runProfileProcCommand } = await import("./profileProcCmd-5Y3733E7.js");
4432
+ const { runProfileProcCommand } = await import("./profileProcCmd-33YB4RXZ.js");
4433
4433
  const durationSec = parseFloat(opts.duration) || 5;
4434
4434
  await runProfileProcCommand({
4435
4435
  pid: targetPid,
@@ -4439,7 +4439,7 @@ async function main() {
4439
4439
  return;
4440
4440
  }
4441
4441
  if (cmd === "watchdog") {
4442
- const { runWatchdogCommand } = await import("./watchdogCmd-XM6OPTKM.js");
4442
+ const { runWatchdogCommand } = await import("./watchdogCmd-346TXWWH.js");
4443
4443
  await runWatchdogCommand({
4444
4444
  configFile: opts.watchdogConfig,
4445
4445
  dryRun: !!opts.dryRun,
@@ -4448,14 +4448,14 @@ async function main() {
4448
4448
  return;
4449
4449
  }
4450
4450
  if (cmd === "build") {
4451
- const { runBuildCommand } = await import("./buildCmd-E7KUCFYG.js");
4451
+ const { runBuildCommand } = await import("./buildCmd-R6RY3XZR.js");
4452
4452
  await runBuildCommand({
4453
4453
  json: !!opts.json
4454
4454
  });
4455
4455
  return;
4456
4456
  }
4457
4457
  if (cmd === "topo") {
4458
- const { runTopoCommand } = await import("./topoCmd-RTXQJ6XA.js");
4458
+ const { runTopoCommand } = await import("./topoCmd-RVWFSPHE.js");
4459
4459
  await runTopoCommand({
4460
4460
  scan: !!opts.scan,
4461
4461
  json: !!opts.json
@@ -4471,7 +4471,7 @@ async function main() {
4471
4471
  return;
4472
4472
  }
4473
4473
  if (cmd === "brew") {
4474
- const { printBrewHealthReport } = await import("./brewHealth-VFW33QB3.js");
4474
+ const { printBrewHealthReport } = await import("./brewHealth-JE4EZ63L.js");
4475
4475
  await printBrewHealthReport();
4476
4476
  return;
4477
4477
  }
@@ -4599,7 +4599,7 @@ async function main() {
4599
4599
  return;
4600
4600
  }
4601
4601
  if (cmd === "doctor") {
4602
- const { runDoctor: runDoctor2, printDoctorReport: printDoctorReport2 } = await import("./doctor-O4DIAMHK.js");
4602
+ const { runDoctor: runDoctor2, printDoctorReport: printDoctorReport2 } = await import("./doctor-SCHRYF6D.js");
4603
4603
  const checks = await runDoctor2();
4604
4604
  printDoctorReport2(checks);
4605
4605
  return;
@@ -4877,7 +4877,7 @@ async function runP2PConnect() {
4877
4877
  }
4878
4878
  async function runInfoCommand() {
4879
4879
  const data = await collectAll({ detailed: true });
4880
- const { getDisplayInfo, getTimeMachineStatus } = await import("./collectors-V7SCIIDH.js");
4880
+ const { getDisplayInfo, getTimeMachineStatus } = await import("./collectors-DQEVTONN.js");
4881
4881
  const displays = await getDisplayInfo();
4882
4882
  const tmStatus = await getTimeMachineStatus();
4883
4883
  const lines = [];
@@ -4920,7 +4920,7 @@ async function runInfoCommand() {
4920
4920
  lines.push("");
4921
4921
  lines.push(chalk9.cyan.bold(" \u23F1 System Restore & Recovery:"));
4922
4922
  try {
4923
- const { runPowerShell } = await import("./run-UJQYT2TO.js");
4923
+ const { runPowerShell } = await import("./run-744KZ7CE.js");
4924
4924
  const srRaw = await runPowerShell(
4925
4925
  `(Get-CimInstance -Namespace root/default -ClassName SystemRestore -ErrorAction SilentlyContinue | Select-Object -Last 1 -ExpandProperty Description) -join ''`,
4926
4926
  ""
@@ -5373,6 +5373,10 @@ Error: Port ${port} is already in use.`));
5373
5373
  console.log(chalk9.dim(` Metrics: http://localhost:${actualPort}/metrics`));
5374
5374
  console.log(chalk9.dim(` SSE Stream: http://localhost:${actualPort}/api/stream`));
5375
5375
  }
5376
+ if (process.platform === "win32") {
5377
+ collectAll({ detailed: true }).catch(() => {
5378
+ });
5379
+ }
5376
5380
  resolve(actualPort);
5377
5381
  });
5378
5382
  process.once("SIGINT", () => {
@@ -5433,7 +5437,7 @@ async function runUiCommand() {
5433
5437
  const port = await runWebCommand(bindHost);
5434
5438
  const url = `http://localhost:${port}`;
5435
5439
  if (process.platform === "darwin") {
5436
- const { run } = await import("./run-UJQYT2TO.js");
5440
+ const { run } = await import("./run-744KZ7CE.js");
5437
5441
  const hasSwift = (await run("which swift 2>/dev/null", "")).trim().length > 0;
5438
5442
  if (hasSwift) {
5439
5443
  const isCompact = !!opts.compact;
@@ -5660,15 +5664,36 @@ app.run()
5660
5664
  "platform",
5661
5665
  "windows-ui.ps1"
5662
5666
  );
5667
+ if (!fs10.existsSync(scriptPath)) {
5668
+ console.log(chalk9.cyan(`
5669
+ Opening live UI dashboard at ${url}...`));
5670
+ await openBrowserUrl(url);
5671
+ console.log(chalk9.dim(" Press Ctrl+C to stop server.\n"));
5672
+ await new Promise(() => {
5673
+ });
5674
+ return;
5675
+ }
5663
5676
  const { spawn } = await import("child_process");
5664
5677
  console.log(chalk9.cyan(`
5665
5678
  Launching native UI window...`));
5679
+ const startedAt = Date.now();
5666
5680
  const ui = spawn(
5667
5681
  "powershell.exe",
5668
- ["-NoProfile", "-NonInteractive", "-ExecutionPolicy", "Bypass", "-File", scriptPath, "-Port", String(port)],
5669
- { stdio: "inherit" }
5682
+ ["-NoLogo", "-NoProfile", "-NonInteractive", "-ExecutionPolicy", "Bypass", "-File", scriptPath, "-Port", String(port)],
5683
+ { stdio: "inherit", windowsHide: true }
5670
5684
  );
5685
+ ui.on("error", async () => {
5686
+ console.log(chalk9.cyan(`
5687
+ Opening live UI dashboard at ${url}...`));
5688
+ await openBrowserUrl(url);
5689
+ console.log(chalk9.dim(" Press Ctrl+C to stop server.\n"));
5690
+ });
5671
5691
  ui.on("close", () => {
5692
+ if (Date.now() - startedAt < 5e3) {
5693
+ console.log(chalk9.dim(` UI opened in your browser at ${url}`));
5694
+ console.log(chalk9.dim(" Press Ctrl+C to stop server.\n"));
5695
+ return;
5696
+ }
5672
5697
  console.log(chalk9.dim("UI window closed, shutting down server..."));
5673
5698
  process.exit(0);
5674
5699
  });
@@ -5676,6 +5701,8 @@ app.run()
5676
5701
  ui.kill();
5677
5702
  process.exit(0);
5678
5703
  });
5704
+ await new Promise(() => {
5705
+ });
5679
5706
  return;
5680
5707
  }
5681
5708
  console.log(chalk9.cyan(`
@@ -33,12 +33,22 @@ foreach ($b in $browsers) {
33
33
  }
34
34
 
35
35
  if ($targetBrowser) {
36
- # Launch in standalone application window mode (frameless app window)
37
- $args = "--app=$url --window-size=1200,800"
38
- $proc = Start-Process -FilePath $targetBrowser -ArgumentList $args -PassThru -Wait
36
+ # Launch in standalone application window mode (frameless app window).
37
+ # A dedicated --user-data-dir forces a separate browser process; without it Chromium hands the
38
+ # URL to an already-running instance and this process exits immediately.
39
+ $profileDir = Join-Path $env:TEMP 'pyre-ui-profile'
40
+ $browserArgs = @(
41
+ "--app=$url",
42
+ "--window-size=1200,800",
43
+ "--user-data-dir=`"$profileDir`"",
44
+ "--no-first-run",
45
+ "--no-default-browser-check",
46
+ "--disable-features=Translate"
47
+ )
48
+ Start-Process -FilePath $targetBrowser -ArgumentList $browserArgs -Wait
39
49
  exit 0
40
50
  }
41
51
 
42
- # 2. Fallback: Launch default system browser
52
+ # 2. Fallback: Launch default system browser (does not block; the Pyre server keeps running)
43
53
  Start-Process $url
44
54
  exit 0
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  collectPackets
3
- } from "./chunk-QEH4LR6P.js";
4
- import "./chunk-NMGQVRCA.js";
5
- import "./chunk-FYCBGUTW.js";
6
- import "./chunk-OCL7P7N7.js";
3
+ } from "./chunk-D3HWHU3X.js";
4
+ import "./chunk-KLANOKZF.js";
5
+ import "./chunk-GPSU54LZ.js";
6
+ import "./chunk-YXZ4XREM.js";
7
7
  import {
8
8
  formatBytes
9
9
  } from "./chunk-XTOOEKLM.js";
10
10
  import "./chunk-ZLVIVFSO.js";
11
- import "./chunk-MZO5QKUR.js";
11
+ import "./chunk-735X2GPS.js";
12
12
  import "./chunk-3RG5ZIWI.js";
13
13
 
14
14
  // src/netUsageCmd.ts
@@ -940,7 +940,7 @@ async function runWindowsTrash(opts) {
940
940
  console.log(chalk.bold("\n pyre optimize trash \u2014 Windows Recycle Bin\n"));
941
941
  if (opts.empty || opts.yes) {
942
942
  try {
943
- const { runPowerShell } = await import("./run-UJQYT2TO.js");
943
+ const { runPowerShell } = await import("./run-744KZ7CE.js");
944
944
  await runPowerShell("Clear-RecycleBin -Force -ErrorAction SilentlyContinue", "");
945
945
  console.log(chalk.green(" \u2714 Emptied Recycle Bin.\n"));
946
946
  } catch (err) {
@@ -1000,7 +1000,7 @@ async function runWindowsCaches(opts) {
1000
1000
  async function runWindowsStartup() {
1001
1001
  console.log(chalk.bold("\n pyre optimize startup \u2014 Windows Startup Applications\n"));
1002
1002
  try {
1003
- const { runPowerShell } = await import("./run-UJQYT2TO.js");
1003
+ const { runPowerShell } = await import("./run-744KZ7CE.js");
1004
1004
  const raw = await runPowerShell(
1005
1005
  `$hkcu = Get-ItemProperty 'HKCU:\\Software\\Microsoft\\Windows\\CurrentVersion\\Run' -ErrorAction SilentlyContinue; $hklm = Get-ItemProperty 'HKLM:\\Software\\Microsoft\\Windows\\CurrentVersion\\Run' -ErrorAction SilentlyContinue; if ($hkcu) { $hkcu.PSObject.Properties | Where-Object { $_.Name -notmatch '^PS' } | ForEach-Object { "User|$($_.Name)|$($_.Value)" } }; if ($hklm) { $hklm.PSObject.Properties | Where-Object { $_.Name -notmatch '^PS' } | ForEach-Object { "System|$($_.Name)|$($_.Value)" } }`,
1006
1006
  ""
@@ -1,11 +1,11 @@
1
1
  import "./chunk-IM3IQMMT.js";
2
2
  import {
3
3
  collectAll
4
- } from "./chunk-QEH4LR6P.js";
5
- import "./chunk-NMGQVRCA.js";
6
- import "./chunk-FYCBGUTW.js";
7
- import "./chunk-OCL7P7N7.js";
8
- import "./chunk-MZO5QKUR.js";
4
+ } from "./chunk-D3HWHU3X.js";
5
+ import "./chunk-KLANOKZF.js";
6
+ import "./chunk-GPSU54LZ.js";
7
+ import "./chunk-YXZ4XREM.js";
8
+ import "./chunk-735X2GPS.js";
9
9
  import "./chunk-3RG5ZIWI.js";
10
10
 
11
11
  // src/pipeCmd.ts
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  runPowerShell
3
- } from "./chunk-MZO5QKUR.js";
3
+ } from "./chunk-735X2GPS.js";
4
4
  import "./chunk-3RG5ZIWI.js";
5
5
 
6
6
  // src/profileProcCmd.ts
@@ -4,11 +4,11 @@ import {
4
4
  import "./chunk-IM3IQMMT.js";
5
5
  import {
6
6
  collectAll
7
- } from "./chunk-QEH4LR6P.js";
8
- import "./chunk-NMGQVRCA.js";
9
- import "./chunk-FYCBGUTW.js";
10
- import "./chunk-OCL7P7N7.js";
11
- import "./chunk-MZO5QKUR.js";
7
+ } from "./chunk-D3HWHU3X.js";
8
+ import "./chunk-KLANOKZF.js";
9
+ import "./chunk-GPSU54LZ.js";
10
+ import "./chunk-YXZ4XREM.js";
11
+ import "./chunk-735X2GPS.js";
12
12
  import "./chunk-3RG5ZIWI.js";
13
13
 
14
14
  // src/prometheusCmd.ts
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  run,
3
3
  runPowerShell
4
- } from "./chunk-MZO5QKUR.js";
4
+ } from "./chunk-735X2GPS.js";
5
5
  import "./chunk-3RG5ZIWI.js";
6
6
  export {
7
7
  run,
@@ -10,11 +10,11 @@ import {
10
10
  collectProcesses,
11
11
  collectSystem,
12
12
  collectThermal
13
- } from "./chunk-QEH4LR6P.js";
14
- import "./chunk-NMGQVRCA.js";
15
- import "./chunk-FYCBGUTW.js";
16
- import "./chunk-OCL7P7N7.js";
17
- import "./chunk-MZO5QKUR.js";
13
+ } from "./chunk-D3HWHU3X.js";
14
+ import "./chunk-KLANOKZF.js";
15
+ import "./chunk-GPSU54LZ.js";
16
+ import "./chunk-YXZ4XREM.js";
17
+ import "./chunk-735X2GPS.js";
18
18
  import "./chunk-3RG5ZIWI.js";
19
19
 
20
20
  // src/serveCmd.ts
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  runPowerShell
3
- } from "./chunk-MZO5QKUR.js";
3
+ } from "./chunk-735X2GPS.js";
4
4
  import "./chunk-3RG5ZIWI.js";
5
5
 
6
6
  // src/smartCmd.ts
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  collectAll
3
- } from "./chunk-QEH4LR6P.js";
4
- import "./chunk-NMGQVRCA.js";
5
- import "./chunk-FYCBGUTW.js";
6
- import "./chunk-OCL7P7N7.js";
7
- import "./chunk-MZO5QKUR.js";
3
+ } from "./chunk-D3HWHU3X.js";
4
+ import "./chunk-KLANOKZF.js";
5
+ import "./chunk-GPSU54LZ.js";
6
+ import "./chunk-YXZ4XREM.js";
7
+ import "./chunk-735X2GPS.js";
8
8
  import "./chunk-3RG5ZIWI.js";
9
9
 
10
10
  // src/statuslineCmd.ts
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  collectNetwork
3
- } from "./chunk-QEH4LR6P.js";
4
- import "./chunk-NMGQVRCA.js";
5
- import "./chunk-FYCBGUTW.js";
6
- import "./chunk-OCL7P7N7.js";
3
+ } from "./chunk-D3HWHU3X.js";
4
+ import "./chunk-KLANOKZF.js";
5
+ import "./chunk-GPSU54LZ.js";
6
+ import "./chunk-YXZ4XREM.js";
7
7
  import {
8
8
  run,
9
9
  runPowerShell
10
- } from "./chunk-MZO5QKUR.js";
10
+ } from "./chunk-735X2GPS.js";
11
11
  import "./chunk-3RG5ZIWI.js";
12
12
 
13
13
  // src/topoCmd.ts
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  collectAll
3
- } from "./chunk-QEH4LR6P.js";
4
- import "./chunk-NMGQVRCA.js";
5
- import "./chunk-FYCBGUTW.js";
6
- import "./chunk-OCL7P7N7.js";
3
+ } from "./chunk-D3HWHU3X.js";
4
+ import "./chunk-KLANOKZF.js";
5
+ import "./chunk-GPSU54LZ.js";
6
+ import "./chunk-YXZ4XREM.js";
7
7
  import {
8
8
  sendAlert
9
9
  } from "./chunk-Z2YV5HKV.js";
10
- import "./chunk-MZO5QKUR.js";
10
+ import "./chunk-735X2GPS.js";
11
11
  import {
12
12
  getConfigDir,
13
13
  readConfig
@@ -154,7 +154,7 @@ async function runWatchdogCommand(opts = {}) {
154
154
  }
155
155
  if (rule.dumpFlight) {
156
156
  try {
157
- const { captureCurrentFlightFrame, globalFlightRecorder } = await import("./flightRecorder-GJIAQOXC.js");
157
+ const { captureCurrentFlightFrame, globalFlightRecorder } = await import("./flightRecorder-J4TESP5M.js");
158
158
  const frame = await captureCurrentFlightFrame();
159
159
  globalFlightRecorder.push(frame);
160
160
  const path2 = globalFlightRecorder.dump();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pyre-cli",
3
- "version": "10.5.0",
3
+ "version": "10.6.0",
4
4
  "description": "Cross-platform system monitoring CLI for macOS, Linux, and Windows: temps, system stats, live dashboard, packet monitor, battery predictor, export",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
package/src/index.ts CHANGED
@@ -1557,6 +1557,10 @@ async function runWebCommand(bindHost?: string): Promise<number> {
1557
1557
  console.log(chalk.dim(` SSE Stream: http://localhost:${actualPort}/api/stream`));
1558
1558
  }
1559
1559
 
1560
+ if (process.platform === 'win32') {
1561
+ collectAll({ detailed: true }).catch(() => {});
1562
+ }
1563
+
1560
1564
  resolve(actualPort);
1561
1565
  });
1562
1566
 
@@ -1857,15 +1861,39 @@ app.run()
1857
1861
  'platform',
1858
1862
  'windows-ui.ps1'
1859
1863
  );
1864
+
1865
+ if (!fs.existsSync(scriptPath)) {
1866
+ // Launcher script missing from this install: open the default browser instead.
1867
+ console.log(chalk.cyan(`\n Opening live UI dashboard at ${url}...`));
1868
+ await openBrowserUrl(url);
1869
+ console.log(chalk.dim(' Press Ctrl+C to stop server.\n'));
1870
+ await new Promise(() => {});
1871
+ return;
1872
+ }
1873
+
1860
1874
  const { spawn } = await import('node:child_process');
1861
1875
  console.log(chalk.cyan(`\n Launching native UI window...`));
1876
+ const startedAt = Date.now();
1862
1877
  const ui = spawn(
1863
1878
  'powershell.exe',
1864
- ['-NoProfile', '-NonInteractive', '-ExecutionPolicy', 'Bypass', '-File', scriptPath, '-Port', String(port)],
1865
- { stdio: 'inherit' }
1879
+ ['-NoLogo', '-NoProfile', '-NonInteractive', '-ExecutionPolicy', 'Bypass', '-File', scriptPath, '-Port', String(port)],
1880
+ { stdio: 'inherit', windowsHide: true }
1866
1881
  );
1867
1882
 
1883
+ ui.on('error', async () => {
1884
+ console.log(chalk.cyan(`\n Opening live UI dashboard at ${url}...`));
1885
+ await openBrowserUrl(url);
1886
+ console.log(chalk.dim(' Press Ctrl+C to stop server.\n'));
1887
+ });
1888
+
1868
1889
  ui.on('close', () => {
1890
+ if (Date.now() - startedAt < 5000) {
1891
+ // Launcher returned immediately (default-browser fallback or browser handoff):
1892
+ // the page is still open in a browser, so keep serving it.
1893
+ console.log(chalk.dim(` UI opened in your browser at ${url}`));
1894
+ console.log(chalk.dim(' Press Ctrl+C to stop server.\n'));
1895
+ return;
1896
+ }
1869
1897
  console.log(chalk.dim('UI window closed, shutting down server...'));
1870
1898
  process.exit(0);
1871
1899
  });
@@ -1874,6 +1902,7 @@ app.run()
1874
1902
  ui.kill();
1875
1903
  process.exit(0);
1876
1904
  });
1905
+ await new Promise(() => {});
1877
1906
  return;
1878
1907
  }
1879
1908
 
@@ -33,12 +33,22 @@ foreach ($b in $browsers) {
33
33
  }
34
34
 
35
35
  if ($targetBrowser) {
36
- # Launch in standalone application window mode (frameless app window)
37
- $args = "--app=$url --window-size=1200,800"
38
- $proc = Start-Process -FilePath $targetBrowser -ArgumentList $args -PassThru -Wait
36
+ # Launch in standalone application window mode (frameless app window).
37
+ # A dedicated --user-data-dir forces a separate browser process; without it Chromium hands the
38
+ # URL to an already-running instance and this process exits immediately.
39
+ $profileDir = Join-Path $env:TEMP 'pyre-ui-profile'
40
+ $browserArgs = @(
41
+ "--app=$url",
42
+ "--window-size=1200,800",
43
+ "--user-data-dir=`"$profileDir`"",
44
+ "--no-first-run",
45
+ "--no-default-browser-check",
46
+ "--disable-features=Translate"
47
+ )
48
+ Start-Process -FilePath $targetBrowser -ArgumentList $browserArgs -Wait
39
49
  exit 0
40
50
  }
41
51
 
42
- # 2. Fallback: Launch default system browser
52
+ # 2. Fallback: Launch default system browser (does not block; the Pyre server keeps running)
43
53
  Start-Process $url
44
54
  exit 0