@kanonak-protocol/cli 5.10.0 → 5.11.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/dist/commands/ask.d.ts +23 -0
- package/dist/commands/docs.d.ts +5 -0
- package/dist/commands/models.d.ts +33 -0
- package/dist/index.js +250 -168
- package/dist/ui/ui.d.ts +70 -0
- package/package.json +3 -3
package/dist/ui/ui.d.ts
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
export declare const OUT_COLOR: boolean;
|
|
2
|
+
export declare const ERR_COLOR: boolean;
|
|
3
|
+
/** A set of semantic style functions gated on whether color is enabled for a stream. */
|
|
4
|
+
export interface Palette {
|
|
5
|
+
bold(s: string): string;
|
|
6
|
+
dim(s: string): string;
|
|
7
|
+
green(s: string): string;
|
|
8
|
+
red(s: string): string;
|
|
9
|
+
yellow(s: string): string;
|
|
10
|
+
cyan(s: string): string;
|
|
11
|
+
}
|
|
12
|
+
export declare function makePalette(on: boolean): Palette;
|
|
13
|
+
/** A top-level status line for a verb in progress ("Validating …"). → stderr. */
|
|
14
|
+
export declare function step(msg: string): void;
|
|
15
|
+
/** A secondary status line under a step (indented). → stderr. */
|
|
16
|
+
export declare function detail(msg: string): void;
|
|
17
|
+
/** A completed sub-result: green ✓ + message, indented under its step. → stderr. */
|
|
18
|
+
export declare function success(msg: string): void;
|
|
19
|
+
/** The final outcome of a verb: blank line, green ✓, bold message. → stderr. */
|
|
20
|
+
export declare function finish(msg: string): void;
|
|
21
|
+
/** A warning the user should read but that doesn't stop the verb: yellow ⚠. → stderr. */
|
|
22
|
+
export declare function warn(msg: string): void;
|
|
23
|
+
/** A dim follow-up hint. → stderr. */
|
|
24
|
+
export declare function hint(msg: string): void;
|
|
25
|
+
/** Green "✓ …" fragment for composing aligned report lines. */
|
|
26
|
+
export declare function glyphOk(msg: string): string;
|
|
27
|
+
/** Red "✗ …" fragment for composing aligned report lines. */
|
|
28
|
+
export declare function glyphBad(msg: string): string;
|
|
29
|
+
/** Render a fatal error: red `error:` + the message, then any cause chain, each indented. → stderr. */
|
|
30
|
+
export declare function renderError(err: unknown): void;
|
|
31
|
+
/** Megabits/sec rendering of a bytes/sec rate — shown alongside MB/s because the two differ 8×. */
|
|
32
|
+
export declare function mbps(bytesPerSec: number): string;
|
|
33
|
+
export declare class MarkdownStream {
|
|
34
|
+
private partial;
|
|
35
|
+
private state;
|
|
36
|
+
private readonly p;
|
|
37
|
+
private readonly color;
|
|
38
|
+
constructor(color?: boolean);
|
|
39
|
+
/** Feed a chunk; return rendered output that is FINAL (append-only). */
|
|
40
|
+
push(chunk: string): string;
|
|
41
|
+
/** Flush the dangling partial line and close any open block. */
|
|
42
|
+
finish(): string;
|
|
43
|
+
private line;
|
|
44
|
+
private flushProsePartial;
|
|
45
|
+
private yamlLine;
|
|
46
|
+
private renderBufferedFence;
|
|
47
|
+
private plainBlock;
|
|
48
|
+
private jsonAnsi;
|
|
49
|
+
private renderTable;
|
|
50
|
+
/** On-screen width of a cell after inline styling — count non-ANSI chars of the rendered form. */
|
|
51
|
+
private visibleWidth;
|
|
52
|
+
/** Style inline `code` (cyan) then **bold** in the remaining text. */
|
|
53
|
+
private inlineSpans;
|
|
54
|
+
/** Style **bold** pairs (balanced only). Single-asterisk italics deliberately NOT interpreted. */
|
|
55
|
+
private boldSpans;
|
|
56
|
+
}
|
|
57
|
+
/** Longest prefix that can be styled independently of what follows (balanced ` and **, not
|
|
58
|
+
* ending on a possible marker char). */
|
|
59
|
+
export declare function spanSafeLen(text: string): number;
|
|
60
|
+
/** Batch rendering is streaming with one chunk — the ONE rendering path is MarkdownStream. */
|
|
61
|
+
export declare function markdownToAnsi(text: string, color?: boolean): string;
|
|
62
|
+
/** Render markdown for the terminal (→ stdout). Verbatim when stdout is not a TTY. */
|
|
63
|
+
export declare function markdown(text: string): void;
|
|
64
|
+
/** Write an already-rendered streaming fragment to stdout immediately. */
|
|
65
|
+
export declare function streamChunk(rendered: string): void;
|
|
66
|
+
export interface Spinner {
|
|
67
|
+
finishAndClear(): void;
|
|
68
|
+
}
|
|
69
|
+
/** An indeterminate spinner for a wait. → stderr. On a non-TTY, prints the message once. */
|
|
70
|
+
export declare function spinner(msg: string): Spinner;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kanonak-protocol/cli",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.11.0",
|
|
4
4
|
"description": "Command-line tool for the Kanonak Protocol — validate, resolve, preview, and publish semantic ontology packages.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"semantic-web"
|
|
36
36
|
],
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@kanonak-protocol/sdk": "^5.
|
|
39
|
-
"@kanonak-protocol/types": "^5.
|
|
38
|
+
"@kanonak-protocol/sdk": "^5.11.0",
|
|
39
|
+
"@kanonak-protocol/types": "^5.11.0",
|
|
40
40
|
"commander": "^13.0.0",
|
|
41
41
|
"js-yaml": "^4.1.1"
|
|
42
42
|
},
|