@mx-space/cli 0.7.0 → 0.7.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-CWdGhWtj.mjs";
2
+ import { t as run } from "../mxs-ClNF0UNu.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-ClNF0UNu.mjs";
2
2
  export { codeForTag, defaultGlobalFlags, defaultMessageFor, exitCodeForError, exitCodeForTag, parseGlobalFlags, run, tagToCode, toErrorEnvelope };
@@ -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);
@@ -28617,8 +28617,7 @@ const colorForCommentState = (raw, color) => {
28617
28617
  if (label === "junk") return wrap(ANSI.red, label, color);
28618
28618
  return formatStateBadge(label, color) ?? label;
28619
28619
  };
28620
- const truncate = (s, max = 80) => s.length > max ? `${s.slice(0, max - 1)}…` : s;
28621
- const oneLine = (s) => s.replaceAll(/\s+/g, " ").trim();
28620
+ const indentBody = (s, indent = " ") => s.replace(/\s+$/, "").split("\n").map((line) => `${indent}${line}`).join("\n");
28622
28621
  const authorOf = (doc) => {
28623
28622
  const reader = asRecord(first(doc, "reader"));
28624
28623
  if (Object.keys(reader).length > 0) {
@@ -28709,7 +28708,7 @@ const renderListItem = (doc, index, color) => {
28709
28708
  if (created !== void 0) metaParts.push(tryFormatTimestamp(created, { style: "rel" }) ?? formatScalar(created));
28710
28709
  if (metaParts.length > 0) lines.push(wrap(ANSI.dim, ` ${metaParts.join(" · ")}`, color));
28711
28710
  const text = firstString(doc, "text");
28712
- if (text) lines.push(` ${truncate(oneLine(text))}`);
28711
+ if (text) lines.push(indentBody(text));
28713
28712
  return lines.join("\n");
28714
28713
  };
28715
28714
  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.1",
4
4
  "description": "Command line interface for mx-space (mx-core) — auth, content, configuration",
5
5
  "keywords": [
6
6
  "mx-space",