@mx-space/cli 0.3.0 → 0.3.1

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/bin/mxs.mjs CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- import { t as run } from "../mxs-BUOk42XP.mjs";
2
+ import { t as run } from "../mxs-D-YXaS2T.mjs";
3
3
  export { run };
package/dist/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { a as defaultMessageFor, c as tagToCode, i as codeForTag, l as toErrorEnvelope, n as defaultGlobalFlags, o as exitCodeForError, r as parseGlobalFlags, s as exitCodeForTag, t as run } from "./mxs-BUOk42XP.mjs";
1
+ import { a as defaultMessageFor, c as tagToCode, i as codeForTag, l as toErrorEnvelope, n as defaultGlobalFlags, o as exitCodeForError, r as parseGlobalFlags, s as exitCodeForTag, t as run } from "./mxs-D-YXaS2T.mjs";
2
2
  export { codeForTag, defaultGlobalFlags, defaultMessageFor, exitCodeForError, exitCodeForTag, parseGlobalFlags, run, tagToCode, toErrorEnvelope };
@@ -24,7 +24,7 @@ import * as ChildProcess from "node:child_process";
24
24
  import childProcess, { execFile, spawn } from "node:child_process";
25
25
  import * as readline from "node:readline";
26
26
  import E from "node:readline";
27
- import V, { stdin, stdout } from "node:process";
27
+ import process$1, { stdin, stdout } from "node:process";
28
28
  import "node:tty";
29
29
  //#region ../../node_modules/.pnpm/@effect+platform@0.96.1_effect@3.21.2/node_modules/@effect/platform/dist/esm/Error.js
30
30
  /**
@@ -9014,7 +9014,7 @@ function isInsideContainer() {
9014
9014
  //#endregion
9015
9015
  //#region ../../node_modules/.pnpm/is-wsl@3.1.1/node_modules/is-wsl/index.js
9016
9016
  const isWsl = () => {
9017
- if (V.platform !== "linux") return false;
9017
+ if (process$1.platform !== "linux") return false;
9018
9018
  if (os.release().toLowerCase().includes("microsoft")) {
9019
9019
  if (isInsideContainer()) return false;
9020
9020
  return true;
@@ -9025,11 +9025,11 @@ const isWsl = () => {
9025
9025
  if (fs.existsSync("/proc/sys/fs/binfmt_misc/WSLInterop") || fs.existsSync("/run/WSL")) return !isInsideContainer();
9026
9026
  return false;
9027
9027
  };
9028
- var is_wsl_default = V.env.__IS_WSL_TEST__ ? isWsl : isWsl();
9028
+ var is_wsl_default = process$1.env.__IS_WSL_TEST__ ? isWsl : isWsl();
9029
9029
  //#endregion
9030
9030
  //#region ../../node_modules/.pnpm/powershell-utils@0.1.0/node_modules/powershell-utils/index.js
9031
9031
  const execFile$2 = promisify(childProcess.execFile);
9032
- const powerShellPath$1 = () => `${V.env.SYSTEMROOT || V.env.windir || String.raw`C:\Windows`}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`;
9032
+ const powerShellPath$1 = () => `${process$1.env.SYSTEMROOT || process$1.env.windir || String.raw`C:\Windows`}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`;
9033
9033
  const executePowerShell = async (command, options = {}) => {
9034
9034
  const { powerShellPath: psPath, ...execFileOptions } = options;
9035
9035
  const encodedCommand = executePowerShell.encodeCommand(command);
@@ -9136,7 +9136,7 @@ function defineLazyProperty(object, propertyName, valueGetter) {
9136
9136
  //#region ../../node_modules/.pnpm/default-browser-id@5.0.1/node_modules/default-browser-id/index.js
9137
9137
  const execFileAsync$3 = promisify(execFile);
9138
9138
  async function defaultBrowserId() {
9139
- if (V.platform !== "darwin") throw new Error("macOS only");
9139
+ if (process$1.platform !== "darwin") throw new Error("macOS only");
9140
9140
  const { stdout } = await execFileAsync$3("defaults", [
9141
9141
  "read",
9142
9142
  "com.apple.LaunchServices/com.apple.launchservices.secure",
@@ -9150,7 +9150,7 @@ async function defaultBrowserId() {
9150
9150
  //#region ../../node_modules/.pnpm/run-applescript@7.1.0/node_modules/run-applescript/index.js
9151
9151
  const execFileAsync$2 = promisify(execFile);
9152
9152
  async function runAppleScript(script, { humanReadableOutput = true, signal } = {}) {
9153
- if (V.platform !== "darwin") throw new Error("macOS only");
9153
+ if (process$1.platform !== "darwin") throw new Error("macOS only");
9154
9154
  const outputArguments = humanReadableOutput ? [] : ["-ss"];
9155
9155
  const execOptions = {};
9156
9156
  if (signal) execOptions.signal = signal;
@@ -9261,14 +9261,14 @@ async function defaultBrowser$1(_execFileAsync = execFileAsync$1) {
9261
9261
  const execFileAsync = promisify(execFile);
9262
9262
  const titleize = (string) => string.toLowerCase().replaceAll(/(?:^|\s|-)\S/g, (x) => x.toUpperCase());
9263
9263
  async function defaultBrowser() {
9264
- if (V.platform === "darwin") {
9264
+ if (process$1.platform === "darwin") {
9265
9265
  const id = await defaultBrowserId();
9266
9266
  return {
9267
9267
  name: await bundleName(id),
9268
9268
  id
9269
9269
  };
9270
9270
  }
9271
- if (V.platform === "linux") {
9271
+ if (process$1.platform === "linux") {
9272
9272
  const { stdout } = await execFileAsync("xdg-mime", [
9273
9273
  "query",
9274
9274
  "default",
@@ -9280,18 +9280,18 @@ async function defaultBrowser() {
9280
9280
  id
9281
9281
  };
9282
9282
  }
9283
- if (V.platform === "win32") return defaultBrowser$1();
9283
+ if (process$1.platform === "win32") return defaultBrowser$1();
9284
9284
  throw new Error("Only macOS, Linux, and Windows are supported");
9285
9285
  }
9286
9286
  //#endregion
9287
9287
  //#region ../../node_modules/.pnpm/is-in-ssh@1.0.0/node_modules/is-in-ssh/index.js
9288
- const isInSsh = Boolean(V.env.SSH_CONNECTION || V.env.SSH_CLIENT || V.env.SSH_TTY);
9288
+ const isInSsh = Boolean(process$1.env.SSH_CONNECTION || process$1.env.SSH_CLIENT || process$1.env.SSH_TTY);
9289
9289
  //#endregion
9290
9290
  //#region ../../node_modules/.pnpm/open@11.0.0/node_modules/open/index.js
9291
9291
  const fallbackAttemptSymbol = Symbol("fallbackAttempt");
9292
9292
  const __dirname = import.meta.url ? path.dirname(fileURLToPath(import.meta.url)) : "";
9293
9293
  const localXdgOpenPath = path.join(__dirname, "xdg-open");
9294
- const { platform, arch } = V;
9294
+ const { platform, arch } = process$1;
9295
9295
  const tryEachApp = async (apps, opener) => {
9296
9296
  if (apps.length === 0) return;
9297
9297
  const errors = [];
@@ -9404,7 +9404,7 @@ const baseOpen = async (options) => {
9404
9404
  await fs$1.access(localXdgOpenPath, constants.X_OK);
9405
9405
  exeLocalXdgOpen = true;
9406
9406
  } catch {}
9407
- command = V.versions.electron ?? (platform === "android" || isBundled || !exeLocalXdgOpen) ? "xdg-open" : localXdgOpenPath;
9407
+ command = process$1.versions.electron ?? (platform === "android" || isBundled || !exeLocalXdgOpen) ? "xdg-open" : localXdgOpenPath;
9408
9408
  }
9409
9409
  if (appArguments.length > 0) cliArguments.push(...appArguments);
9410
9410
  if (!options.wait) {
@@ -10826,7 +10826,7 @@ var ht$1 = class extends m {
10826
10826
  //#endregion
10827
10827
  //#region ../../node_modules/.pnpm/@clack+prompts@1.4.0/node_modules/@clack/prompts/dist/index.mjs
10828
10828
  function ee() {
10829
- return V.platform !== "win32" ? V.env.TERM !== "linux" : !!V.env.CI || !!V.env.WT_SESSION || !!V.env.TERMINUS_SUBLIME || V.env.ConEmuTask === "{cmd::Cmder}" || V.env.TERM_PROGRAM === "Terminus-Sublime" || V.env.TERM_PROGRAM === "vscode" || V.env.TERM === "xterm-256color" || V.env.TERM === "alacritty" || V.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
10829
+ return process$1.platform !== "win32" ? process$1.env.TERM !== "linux" : !!process$1.env.CI || !!process$1.env.WT_SESSION || !!process$1.env.TERMINUS_SUBLIME || process$1.env.ConEmuTask === "{cmd::Cmder}" || process$1.env.TERM_PROGRAM === "Terminus-Sublime" || process$1.env.TERM_PROGRAM === "vscode" || process$1.env.TERM === "xterm-256color" || process$1.env.TERM === "alacritty" || process$1.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
10830
10830
  }
10831
10831
  const tt = ee(), w = (t, i) => tt ? t : i, Tt = w("◆", "*"), at = w("■", "x"), ut = w("▲", "x"), H = w("◇", "o");
10832
10832
  const $ = w("│", "|"), x = w("└", "—");
@@ -30363,12 +30363,13 @@ const preflight = (flags) => gen(function* () {
30363
30363
  parentName: invoked.parentName
30364
30364
  }));
30365
30365
  });
30366
+ const LEAF_COMMANDS = new Set(["update"]);
30366
30367
  const detectHelpTarget = (rest) => {
30367
30368
  const args = rest.slice(2);
30368
30369
  if (args.length === 0) return { kind: "root" };
30369
30370
  const first = args[0];
30370
30371
  if (args.length === 1 && (first === "--help" || first === "-h")) return { kind: "root" };
30371
- if (args.length === 1 && isGroupName(first)) return {
30372
+ if (args.length === 1 && isGroupName(first) && !LEAF_COMMANDS.has(first)) return {
30372
30373
  kind: "group",
30373
30374
  name: first
30374
30375
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mx-space/cli",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Command line interface for mx-space (mx-core) — auth, content, configuration",
5
5
  "keywords": [
6
6
  "mx-space",