@ultimat3/cli 4.0.0 → 4.1.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ultimat3/cli",
3
- "version": "4.0.0",
3
+ "version": "4.1.0",
4
4
  "description": "The `x` binary: new, dev, build, verify, generate, db, mcp, doctor, deploy",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -35,28 +35,28 @@
35
35
  "dev": "bun run src/bin.ts dev"
36
36
  },
37
37
  "dependencies": {
38
- "@ultimat3/action": "4.0.0",
39
- "@ultimat3/admin": "4.0.0",
40
- "@ultimat3/ai": "4.0.0",
41
- "@ultimat3/cache": "4.0.0",
42
- "@ultimat3/core": "4.0.0",
43
- "@ultimat3/db": "4.0.0",
44
- "@ultimat3/entity": "4.0.0",
45
- "@ultimat3/http": "4.0.0",
46
- "@ultimat3/i18n": "4.0.0",
47
- "@ultimat3/jobs": "4.0.0",
48
- "@ultimat3/mail": "4.0.0",
49
- "@ultimat3/manifest": "4.0.0",
50
- "@ultimat3/mcp": "4.0.0",
51
- "@ultimat3/policy": "4.0.0",
52
- "@ultimat3/pwa": "4.0.0",
53
- "@ultimat3/query": "4.0.0",
54
- "@ultimat3/realtime": "4.0.0",
55
- "@ultimat3/render": "4.0.0",
56
- "@ultimat3/schema": "4.0.0",
57
- "@ultimat3/seo": "4.0.0",
58
- "@ultimat3/storage": "4.0.0",
59
- "@ultimat3/testing": "4.0.0",
60
- "@ultimat3/time": "4.0.0"
38
+ "@ultimat3/action": "4.1.0",
39
+ "@ultimat3/admin": "4.1.0",
40
+ "@ultimat3/ai": "4.1.0",
41
+ "@ultimat3/cache": "4.1.0",
42
+ "@ultimat3/core": "4.1.0",
43
+ "@ultimat3/db": "4.1.0",
44
+ "@ultimat3/entity": "4.1.0",
45
+ "@ultimat3/http": "4.1.0",
46
+ "@ultimat3/i18n": "4.1.0",
47
+ "@ultimat3/jobs": "4.1.0",
48
+ "@ultimat3/mail": "4.1.0",
49
+ "@ultimat3/manifest": "4.1.0",
50
+ "@ultimat3/mcp": "4.1.0",
51
+ "@ultimat3/policy": "4.1.0",
52
+ "@ultimat3/pwa": "4.1.0",
53
+ "@ultimat3/query": "4.1.0",
54
+ "@ultimat3/realtime": "4.1.0",
55
+ "@ultimat3/render": "4.1.0",
56
+ "@ultimat3/schema": "4.1.0",
57
+ "@ultimat3/seo": "4.1.0",
58
+ "@ultimat3/storage": "4.1.0",
59
+ "@ultimat3/testing": "4.1.0",
60
+ "@ultimat3/time": "4.1.0"
61
61
  }
62
62
  }
package/src/cmd-errors.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { singleLine } from '@ultimat3/core';
1
2
  // `x errors explain <CODE>` / `x errors list` — the error table, programmatically. An agent that
2
3
  // hits an `X_*` code should not have to leave the terminal to learn what it means, and a code it
3
4
  // invented should come back refused: the answer to an unregistered code is "no such code", never
@@ -35,9 +36,9 @@ const asJson = (explanation: ErrorExplanation): JsonValue => {
35
36
 
36
37
  /** The 3-line contract format, minus the leading blank code line `renderFinding` would add. */
37
38
  const detailLines = (explanation: ErrorExplanation): readonly string[] => [
38
- ` cause: ${explanation.cause}`,
39
- ` fix: ${explanation.fix}`,
40
- ` docs: ${explanation.docs}`,
39
+ ` cause: ${singleLine(explanation.cause)}`,
40
+ ` fix: ${singleLine(explanation.fix)}`,
41
+ ` docs: ${singleLine(explanation.docs)}`,
41
42
  ];
42
43
 
43
44
  function explainOne(code: string): CommandResult {
@@ -69,7 +70,7 @@ function listAll(catalog: ErrorCatalog): CommandResult {
69
70
  ok: catalog.failed.length === 0,
70
71
  command: 'errors',
71
72
  summary: msg('cli.errors.count', { count: all.length }),
72
- lines: all.map((entry) => ` ${entry.code.padEnd(30)} ${entry.cause}`),
73
+ lines: all.map((entry) => ` ${entry.code.padEnd(30)} ${singleLine(entry.cause)}`),
73
74
  findings: catalog.failed,
74
75
  data: {
75
76
  codes: all.map(asJson),
package/src/output.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  // and the JSON renderer are projections of it, so `--json` can never drift from the terminal
3
3
  // output (axiom 4). The human renderer owns the canonical 3-line error format.
4
4
 
5
- import { renderThrowable, stringField } from '@ultimat3/core';
5
+ import { renderThrowable, singleLine, stringField } from '@ultimat3/core';
6
6
  import { msg } from './messages';
7
7
 
8
8
  export interface Finding {
@@ -113,13 +113,16 @@ const summaryOf = (value: UltimateErrorShape): string =>
113
113
  * ```
114
114
  */
115
115
  export function renderFinding(finding: Finding, indent = ''): string {
116
- const head = finding.at === undefined ? finding.code : `${finding.code} (${finding.at})`;
116
+ // Every field through `singleLine`: this is the format's only renderer for the terminal and CI
117
+ // logs, and a `cause` carrying a newline would print a line a reader takes for a real finding.
118
+ const code = singleLine(finding.code);
119
+ const head = finding.at === undefined ? code : `${code} (${singleLine(finding.at)})`;
117
120
  const lines = [
118
121
  `${indent}${head}`,
119
- `${indent} cause: ${finding.cause}`,
120
- `${indent} fix: ${finding.fix}`,
122
+ `${indent} cause: ${singleLine(finding.cause)}`,
123
+ `${indent} fix: ${singleLine(finding.fix)}`,
121
124
  ];
122
- if (finding.docs !== undefined) lines.push(`${indent} docs: ${finding.docs}`);
125
+ if (finding.docs !== undefined) lines.push(`${indent} docs: ${singleLine(finding.docs)}`);
123
126
  return lines.join('\n');
124
127
  }
125
128