@mx-space/cli 0.7.0 → 0.7.2

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-CWdGhWtj.mjs";
2
+ import { t as run } from "../mxs-C8w0_314.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-CWdGhWtj.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-C8w0_314.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 process$1, { stdin, stdout } from "node:process";
27
+ import V, { 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
  /**
@@ -8034,7 +8034,7 @@ const symlink = /* @__PURE__ */ (() => {
8034
8034
  const nodeSymlink = /* @__PURE__ */ effectify(NFS.symlink, /* @__PURE__ */ handleErrnoException("FileSystem", "symlink"), /* @__PURE__ */ handleBadArgument("symlink"));
8035
8035
  return (target, path) => nodeSymlink(target, path);
8036
8036
  })();
8037
- const truncate$1 = /* @__PURE__ */ (() => {
8037
+ const truncate = /* @__PURE__ */ (() => {
8038
8038
  const nodeTruncate = /* @__PURE__ */ effectify(NFS.truncate, /* @__PURE__ */ handleErrnoException("FileSystem", "truncate"), /* @__PURE__ */ handleBadArgument("truncate"));
8039
8039
  return (path, length) => nodeTruncate(path, length !== void 0 ? Number(length) : void 0);
8040
8040
  })();
@@ -8116,7 +8116,7 @@ const layer$9 = /* @__PURE__ */ effect(FileSystem, /* @__PURE__ */ map$6(/* @__P
8116
8116
  rename,
8117
8117
  stat,
8118
8118
  symlink,
8119
- truncate: truncate$1,
8119
+ truncate,
8120
8120
  utimes,
8121
8121
  watch(path, options) {
8122
8122
  return watch(backend, path, options);
@@ -9042,7 +9042,7 @@ function isInsideContainer() {
9042
9042
  //#endregion
9043
9043
  //#region ../../node_modules/.pnpm/is-wsl@3.1.1/node_modules/is-wsl/index.js
9044
9044
  const isWsl = () => {
9045
- if (process$1.platform !== "linux") return false;
9045
+ if (V.platform !== "linux") return false;
9046
9046
  if (os.release().toLowerCase().includes("microsoft")) {
9047
9047
  if (isInsideContainer()) return false;
9048
9048
  return true;
@@ -9053,11 +9053,11 @@ const isWsl = () => {
9053
9053
  if (fs.existsSync("/proc/sys/fs/binfmt_misc/WSLInterop") || fs.existsSync("/run/WSL")) return !isInsideContainer();
9054
9054
  return false;
9055
9055
  };
9056
- var is_wsl_default = process$1.env.__IS_WSL_TEST__ ? isWsl : isWsl();
9056
+ var is_wsl_default = V.env.__IS_WSL_TEST__ ? isWsl : isWsl();
9057
9057
  //#endregion
9058
9058
  //#region ../../node_modules/.pnpm/powershell-utils@0.1.0/node_modules/powershell-utils/index.js
9059
9059
  const execFile$2 = promisify(childProcess.execFile);
9060
- const powerShellPath$1 = () => `${process$1.env.SYSTEMROOT || process$1.env.windir || String.raw`C:\Windows`}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`;
9060
+ const powerShellPath$1 = () => `${V.env.SYSTEMROOT || V.env.windir || String.raw`C:\Windows`}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`;
9061
9061
  const executePowerShell = async (command, options = {}) => {
9062
9062
  const { powerShellPath: psPath, ...execFileOptions } = options;
9063
9063
  const encodedCommand = executePowerShell.encodeCommand(command);
@@ -9164,7 +9164,7 @@ function defineLazyProperty(object, propertyName, valueGetter) {
9164
9164
  //#region ../../node_modules/.pnpm/default-browser-id@5.0.1/node_modules/default-browser-id/index.js
9165
9165
  const execFileAsync$3 = promisify(execFile);
9166
9166
  async function defaultBrowserId() {
9167
- if (process$1.platform !== "darwin") throw new Error("macOS only");
9167
+ if (V.platform !== "darwin") throw new Error("macOS only");
9168
9168
  const { stdout } = await execFileAsync$3("defaults", [
9169
9169
  "read",
9170
9170
  "com.apple.LaunchServices/com.apple.launchservices.secure",
@@ -9178,7 +9178,7 @@ async function defaultBrowserId() {
9178
9178
  //#region ../../node_modules/.pnpm/run-applescript@7.1.0/node_modules/run-applescript/index.js
9179
9179
  const execFileAsync$2 = promisify(execFile);
9180
9180
  async function runAppleScript(script, { humanReadableOutput = true, signal } = {}) {
9181
- if (process$1.platform !== "darwin") throw new Error("macOS only");
9181
+ if (V.platform !== "darwin") throw new Error("macOS only");
9182
9182
  const outputArguments = humanReadableOutput ? [] : ["-ss"];
9183
9183
  const execOptions = {};
9184
9184
  if (signal) execOptions.signal = signal;
@@ -9289,14 +9289,14 @@ async function defaultBrowser$1(_execFileAsync = execFileAsync$1) {
9289
9289
  const execFileAsync = promisify(execFile);
9290
9290
  const titleize = (string) => string.toLowerCase().replaceAll(/(?:^|\s|-)\S/g, (x) => x.toUpperCase());
9291
9291
  async function defaultBrowser() {
9292
- if (process$1.platform === "darwin") {
9292
+ if (V.platform === "darwin") {
9293
9293
  const id = await defaultBrowserId();
9294
9294
  return {
9295
9295
  name: await bundleName(id),
9296
9296
  id
9297
9297
  };
9298
9298
  }
9299
- if (process$1.platform === "linux") {
9299
+ if (V.platform === "linux") {
9300
9300
  const { stdout } = await execFileAsync("xdg-mime", [
9301
9301
  "query",
9302
9302
  "default",
@@ -9308,18 +9308,18 @@ async function defaultBrowser() {
9308
9308
  id
9309
9309
  };
9310
9310
  }
9311
- if (process$1.platform === "win32") return defaultBrowser$1();
9311
+ if (V.platform === "win32") return defaultBrowser$1();
9312
9312
  throw new Error("Only macOS, Linux, and Windows are supported");
9313
9313
  }
9314
9314
  //#endregion
9315
9315
  //#region ../../node_modules/.pnpm/is-in-ssh@1.0.0/node_modules/is-in-ssh/index.js
9316
- const isInSsh = Boolean(process$1.env.SSH_CONNECTION || process$1.env.SSH_CLIENT || process$1.env.SSH_TTY);
9316
+ const isInSsh = Boolean(V.env.SSH_CONNECTION || V.env.SSH_CLIENT || V.env.SSH_TTY);
9317
9317
  //#endregion
9318
9318
  //#region ../../node_modules/.pnpm/open@11.0.0/node_modules/open/index.js
9319
9319
  const fallbackAttemptSymbol = Symbol("fallbackAttempt");
9320
9320
  const __dirname = import.meta.url ? path.dirname(fileURLToPath(import.meta.url)) : "";
9321
9321
  const localXdgOpenPath = path.join(__dirname, "xdg-open");
9322
- const { platform: platform$1, arch: arch$1 } = process$1;
9322
+ const { platform: platform$1, arch: arch$1 } = V;
9323
9323
  const tryEachApp = async (apps, opener) => {
9324
9324
  if (apps.length === 0) return;
9325
9325
  const errors = [];
@@ -9432,7 +9432,7 @@ const baseOpen = async (options) => {
9432
9432
  await fs$1.access(localXdgOpenPath, constants.X_OK);
9433
9433
  exeLocalXdgOpen = true;
9434
9434
  } catch {}
9435
- command = process$1.versions.electron ?? (platform$1 === "android" || isBundled || !exeLocalXdgOpen) ? "xdg-open" : localXdgOpenPath;
9435
+ command = V.versions.electron ?? (platform$1 === "android" || isBundled || !exeLocalXdgOpen) ? "xdg-open" : localXdgOpenPath;
9436
9436
  }
9437
9437
  if (appArguments.length > 0) cliArguments.push(...appArguments);
9438
9438
  if (!options.wait) {
@@ -11024,7 +11024,7 @@ var ht$1 = class extends m {
11024
11024
  //#endregion
11025
11025
  //#region ../../node_modules/.pnpm/@clack+prompts@1.4.0/node_modules/@clack/prompts/dist/index.mjs
11026
11026
  function ee() {
11027
- 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";
11027
+ 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";
11028
11028
  }
11029
11029
  const tt = ee(), w = (t, i) => tt ? t : i, Tt = w("◆", "*"), at = w("■", "x"), ut = w("▲", "x"), H = w("◇", "o");
11030
11030
  const $ = w("│", "|"), x = w("└", "—");
@@ -12618,7 +12618,7 @@ function customAlphabet(alphabet, size = 21) {
12618
12618
  return customRandom(alphabet, size, random);
12619
12619
  }
12620
12620
  //#endregion
12621
- //#region ../../node_modules/.pnpm/@haklex+rich-litexml@0.15.3/node_modules/@haklex/rich-litexml/dist/src-Chu1pfGY.js
12621
+ //#region ../../node_modules/.pnpm/@haklex+rich-litexml@0.15.5/node_modules/@haklex/rich-litexml/dist/src-DM53MOSd.js
12622
12622
  var impl = null;
12623
12623
  function registerParseHTML(fn) {
12624
12624
  impl = fn;
@@ -13628,8 +13628,66 @@ function isFormatTag(tagName) {
13628
13628
  function getFormatBit(tagName) {
13629
13629
  return FORMAT_TAG_TO_BIT[tagName.toLowerCase()] ?? 0;
13630
13630
  }
13631
+ /**
13632
+ * HTML5 void elements — tags the HTML parser already treats as self-closing
13633
+ * regardless of `/>` syntax. Custom or non-void tags written as `<tag … />`
13634
+ * are otherwise interpreted as opening tags by the HTML parser, which then
13635
+ * swallows all following siblings as children until a matching close tag (or
13636
+ * end of document) is found. We expand those into explicit `<tag …></tag>`
13637
+ * before handing the string to linkedom / DOMParser.
13638
+ */
13639
+ var HTML_VOID_ELEMENTS = new Set([
13640
+ "area",
13641
+ "base",
13642
+ "br",
13643
+ "col",
13644
+ "embed",
13645
+ "hr",
13646
+ "img",
13647
+ "input",
13648
+ "link",
13649
+ "meta",
13650
+ "param",
13651
+ "source",
13652
+ "track",
13653
+ "wbr"
13654
+ ]);
13655
+ var SELF_CLOSING_RE = /<([\w-]+)((?:\s+[\w-]+(?:\s*=\s*(?:"[^"]*"|'[^']*'))?)*)\s*\/>/g;
13656
+ var CDATA_OPEN = "<![CDATA[";
13657
+ var CDATA_CLOSE = "]]>";
13658
+ function expandSelfClosing(chunk) {
13659
+ return chunk.replaceAll(SELF_CLOSING_RE, (match, tag, attrs) => {
13660
+ if (HTML_VOID_ELEMENTS.has(tag.toLowerCase())) return match;
13661
+ return `<${tag}${attrs}></${tag}>`;
13662
+ });
13663
+ }
13664
+ /**
13665
+ * Expand `<custom-tag … />` to `<custom-tag …></custom-tag>` outside CDATA.
13666
+ * Leaves HTML void elements and already-paired tags untouched. CDATA content
13667
+ * is sliced out verbatim with `indexOf` to avoid regex pitfalls around `]]>`.
13668
+ */
13669
+ function normalizeSelfClosingTags(xml) {
13670
+ const out = [];
13671
+ let cursor = 0;
13672
+ while (cursor < xml.length) {
13673
+ const start = xml.indexOf(CDATA_OPEN, cursor);
13674
+ if (start < 0) {
13675
+ out.push(expandSelfClosing(xml.slice(cursor)));
13676
+ break;
13677
+ }
13678
+ out.push(expandSelfClosing(xml.slice(cursor, start)));
13679
+ const end = xml.indexOf(CDATA_CLOSE, start + 9);
13680
+ if (end < 0) {
13681
+ out.push(xml.slice(start));
13682
+ break;
13683
+ }
13684
+ out.push(xml.slice(start, end + 3));
13685
+ cursor = end + 3;
13686
+ }
13687
+ return out.join("");
13688
+ }
13631
13689
  function parseXml(xml) {
13632
- return parseHTML$1(`<!DOCTYPE html><html><body>${xml}</body></html>`);
13690
+ return parseHTML$1(`<!DOCTYPE html><html><body>${normalizeSelfClosingTags(xml)}</body></html>`);
13633
13691
  }
13634
13692
  function deserializeFromXml(xml, registry) {
13635
13693
  const doc = parseXml(xml);
@@ -13645,7 +13703,6 @@ function deserializeFromXml(xml, registry) {
13645
13703
  }
13646
13704
  /** Structural containers whose whitespace-only text nodes are layout artifacts, not content */
13647
13705
  var BLOCK_TAGS = new Set([
13648
- "body",
13649
13706
  "doc",
13650
13707
  "fragment",
13651
13708
  "root",
@@ -24886,7 +24943,7 @@ function Document() {
24886
24943
  }
24887
24944
  setPrototypeOf(Document, Document$1).prototype = Document$1.prototype;
24888
24945
  //#endregion
24889
- //#region ../../node_modules/.pnpm/@haklex+rich-litexml@0.15.3/node_modules/@haklex/rich-litexml/dist/node.mjs
24946
+ //#region ../../node_modules/.pnpm/@haklex+rich-litexml@0.15.5/node_modules/@haklex/rich-litexml/dist/node.mjs
24890
24947
  registerParseHTML((html) => parseHTML(html).document);
24891
24948
  //#endregion
24892
24949
  //#region src/services/Renderer/content.ts
@@ -28617,8 +28674,7 @@ const colorForCommentState = (raw, color) => {
28617
28674
  if (label === "junk") return wrap(ANSI.red, label, color);
28618
28675
  return formatStateBadge(label, color) ?? label;
28619
28676
  };
28620
- const truncate = (s, max = 80) => s.length > max ? `${s.slice(0, max - 1)}…` : s;
28621
- const oneLine = (s) => s.replaceAll(/\s+/g, " ").trim();
28677
+ const indentBody = (s, indent = " ") => s.replace(/\s+$/, "").split("\n").map((line) => `${indent}${line}`).join("\n");
28622
28678
  const authorOf = (doc) => {
28623
28679
  const reader = asRecord(first(doc, "reader"));
28624
28680
  if (Object.keys(reader).length > 0) {
@@ -28709,7 +28765,7 @@ const renderListItem = (doc, index, color) => {
28709
28765
  if (created !== void 0) metaParts.push(tryFormatTimestamp(created, { style: "rel" }) ?? formatScalar(created));
28710
28766
  if (metaParts.length > 0) lines.push(wrap(ANSI.dim, ` ${metaParts.join(" · ")}`, color));
28711
28767
  const text = firstString(doc, "text");
28712
- if (text) lines.push(` ${truncate(oneLine(text))}`);
28768
+ if (text) lines.push(indentBody(text));
28713
28769
  return lines.join("\n");
28714
28770
  };
28715
28771
  const renderCommentListReadable = (data, color) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mx-space/cli",
3
- "version": "0.7.0",
3
+ "version": "0.7.2",
4
4
  "description": "Command line interface for mx-space (mx-core) — auth, content, configuration",
5
5
  "keywords": [
6
6
  "mx-space",
@@ -53,8 +53,8 @@
53
53
  "@effect/platform": "0.96.1",
54
54
  "@effect/platform-node": "0.106.0",
55
55
  "@haklex/rich-headless": "0.13.0",
56
- "@haklex/rich-litexml": "0.15.3",
57
- "@haklex/rich-litexml-cli": "0.15.3",
56
+ "@haklex/rich-litexml": "0.15.5",
57
+ "@haklex/rich-litexml-cli": "0.15.5",
58
58
  "@lexical/headless": "^0.44.0",
59
59
  "better-auth": "^1.6.9",
60
60
  "effect": "3.21.2",