@join-pantheon/cli 0.32.0-rc.5 → 0.32.0-rc.6

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.
package/dist/uninstall.js CHANGED
@@ -1,4 +1,4 @@
1
- import { execFileSync, spawn } from "node:child_process";
1
+ import { execFileSync, spawnSync } from "node:child_process";
2
2
  import { existsSync, lstatSync, readFileSync, readdirSync, rmdirSync, rmSync, writeFileSync } from "node:fs";
3
3
  import { platform } from "node:os";
4
4
  import { posix, win32 } from "node:path";
@@ -95,22 +95,24 @@ export function managedInstall(home, os = platform(), env = process.env, fs = re
95
95
  return { os, root, runtime, binDir, launcher, log, present: fs.exists(runtime) || fs.exists(launcher) };
96
96
  }
97
97
  export function finishAfterExit(paths, pids = [process.pid]) {
98
- const script = cleanupScript(paths, pids);
99
- if (!script)
98
+ const inner = cleanupScript(paths, pids);
99
+ if (!inner)
100
100
  return false;
101
101
  const ps = `${process.env.SystemRoot ?? "C:\\Windows"}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`;
102
102
  try {
103
- const child = spawn(ps, ["-NoProfile", "-NonInteractive", "-ExecutionPolicy", "Bypass", "-WindowStyle", "Hidden", "-Command", script], {
104
- detached: true, stdio: "ignore", windowsHide: true,
103
+ const r = spawnSync(ps, ["-NoProfile", "-NonInteractive", "-ExecutionPolicy", "Bypass", "-Command", cleanupLauncher(ps, inner)], {
104
+ windowsHide: true, stdio: "ignore", timeout: 30_000,
105
105
  });
106
- child.on("error", () => { });
107
- child.unref();
108
- return true;
106
+ return r.status === 0;
109
107
  }
110
108
  catch {
111
109
  return false;
112
110
  }
113
111
  }
112
+ export function cleanupLauncher(ps, inner) {
113
+ const enc = Buffer.from(inner, "utf16le").toString("base64");
114
+ return `Start-Process -FilePath '${ps.replace(/'/g, "''")}' -WindowStyle Hidden -ArgumentList '-NoProfile','-NonInteractive','-ExecutionPolicy','Bypass','-EncodedCommand','${enc}'`;
115
+ }
114
116
  export function cleanupScript(paths, pids) {
115
117
  if (!paths.length || paths.some((x) => /[\r\n]/.test(x)))
116
118
  return null;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "format": 1,
3
- "built_at": "2026-10-03T13:44:44.423Z",
3
+ "built_at": "2026-10-03T14:12:14.942Z",
4
4
  "swiftc": "Apple Swift version 6.3.3 (swiftlang-6.3.3.1.3 clang-2100.1.1.101)",
5
5
  "helpers": {
6
6
  "pantheon-tray": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@join-pantheon/cli",
3
- "version": "0.32.0-rc.5",
3
+ "version": "0.32.0-rc.6",
4
4
  "description": "Let your coding agent collaborate directly with your teammates' agents — ask, agree an interface, and deliver, without a human relaying messages.",
5
5
  "type": "module",
6
6
  "bin": {