premanmcp 0.8.0 → 0.10.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.
@@ -14,12 +14,11 @@
14
14
  * hand, and no third-party credential ever touches the terminal.
15
15
  */
16
16
 
17
- import { spawn } from "node:child_process";
18
-
19
17
  import {
20
18
  assertOk,
21
19
  callBackendJson,
22
20
  frontendUrl,
21
+ openUrl,
23
22
  promptText,
24
23
  resolveApiKey,
25
24
  } from "./shared.js";
@@ -43,7 +42,7 @@ function paint(code, text) {
43
42
 
44
43
  export const MARK = {
45
44
  ok: () => paint("32", "✓"),
46
- skip: () => paint("90", "○"),
45
+ skip: () => paint("90", "·"),
47
46
  fail: () => paint("31", "✗"),
48
47
  };
49
48
 
@@ -52,25 +51,6 @@ export function connected(message) {
52
51
  process.stdout.write(`${MARK.ok()} ${message}\n`);
53
52
  }
54
53
 
55
- /** Open a URL in the customer's default browser, best effort. */
56
- export function openUrl(url) {
57
- const command =
58
- process.platform === "darwin" ? "open" : process.platform === "win32" ? "start" : "xdg-open";
59
- try {
60
- const child = spawn(command, [url], {
61
- stdio: "ignore",
62
- detached: true,
63
- shell: process.platform === "win32",
64
- });
65
- child.unref();
66
- return true;
67
- } catch {
68
- // Headless boxes and locked-down shells are normal. The URL is printed
69
- // either way, so this is a convenience, never the only path.
70
- return false;
71
- }
72
- }
73
-
74
54
  function present(url, what) {
75
55
  process.stdout.write(`\n ${url}\n\n`);
76
56
  if (openUrl(url)) process.stdout.write(`Opened ${what} in your browser.\n`);