@jentrix/cli 0.5.7 → 0.5.8

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 (2) hide show
  1. package/dist/main.js +18 -5
  2. package/package.json +1 -1
package/dist/main.js CHANGED
@@ -20962,7 +20962,7 @@ function refreshAccessToken(input) {
20962
20962
 
20963
20963
  // src/client.ts
20964
20964
  var CLI_NAME = "stacks-cli";
20965
- var CLI_VERSION = "0.5.7";
20965
+ var CLI_VERSION = "0.5.8";
20966
20966
  var DEAD_TOKEN_MESSAGE = "authentication failed (HTTP 401): the token is dead or expired \u2014 mint a new PAT at /account/tokens on your Jentrix server and update STACKS_TOKEN (or --token / the config file).";
20967
20967
  var RELOGIN_MESSAGE = "OAuth session expired and could not be refreshed \u2014 run `jentrix login` to sign in again.";
20968
20968
  function originOf2(url2) {
@@ -21117,6 +21117,17 @@ function execTarget(file, args, platform2 = process.platform, comSpec = process.
21117
21117
  options: { windowsVerbatimArguments: true }
21118
21118
  };
21119
21119
  }
21120
+ function browserTarget(url2, platform2 = process.platform, comSpec = process.env.ComSpec) {
21121
+ if (platform2 === "darwin") return { file: "open", args: [url2], options: {} };
21122
+ if (platform2 !== "win32") {
21123
+ return { file: "xdg-open", args: [url2], options: {} };
21124
+ }
21125
+ return {
21126
+ file: comSpec || "cmd.exe",
21127
+ args: ["/d", "/s", "/c", `"start "" ${quoteForCmd(url2)}"`],
21128
+ options: { windowsVerbatimArguments: true }
21129
+ };
21130
+ }
21120
21131
 
21121
21132
  // src/loopback.ts
21122
21133
  import { createServer } from "node:http";
@@ -21185,11 +21196,13 @@ async function bindLoopback(ports, timeoutMs = CALLBACK_TIMEOUT_MS) {
21185
21196
  }
21186
21197
  function openBrowser(url2) {
21187
21198
  return new Promise((resolve5) => {
21188
- const os = platform();
21189
- const cmd = os === "darwin" ? "open" : os === "win32" ? "cmd" : "xdg-open";
21190
- const args = os === "win32" ? ["/c", "start", "", url2] : [url2];
21199
+ const { file, args, options } = browserTarget(url2, platform());
21191
21200
  try {
21192
- const child = spawn(cmd, args, { stdio: "ignore", detached: true });
21201
+ const child = spawn(file, args, {
21202
+ stdio: "ignore",
21203
+ detached: true,
21204
+ ...options
21205
+ });
21193
21206
  child.on("error", () => resolve5());
21194
21207
  child.unref();
21195
21208
  } catch {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jentrix/cli",
3
- "version": "0.5.7",
3
+ "version": "0.5.8",
4
4
  "description": "Command-line client for the Jentrix MCP surface (jentrix tool <name>, generated noun-verb commands).",
5
5
  "keywords": [
6
6
  "jentrix",