@ai-dossier/cli 0.10.0 → 0.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/README.md +75 -7
- package/dist/cache-resolver.d.ts.map +1 -1
- package/dist/cache-resolver.js +4 -16
- package/dist/cache-resolver.js.map +1 -1
- package/dist/commands/cache.d.ts.map +1 -1
- package/dist/commands/cache.js +2 -14
- package/dist/commands/cache.js.map +1 -1
- package/dist/commands/runstate.d.ts +1 -1
- package/dist/commands/runstate.d.ts.map +1 -1
- package/dist/commands/runstate.js +259 -12
- package/dist/commands/runstate.js.map +1 -1
- package/dist/commands/traces.d.ts.map +1 -1
- package/dist/commands/traces.js +6 -7
- package/dist/commands/traces.js.map +1 -1
- package/dist/duration.d.ts +29 -0
- package/dist/duration.d.ts.map +1 -0
- package/dist/duration.js +63 -0
- package/dist/duration.js.map +1 -0
- package/dist/issue-selection.d.ts +22 -0
- package/dist/issue-selection.d.ts.map +1 -0
- package/dist/issue-selection.js +88 -0
- package/dist/issue-selection.js.map +1 -0
- package/dist/runstate-stats.d.ts +157 -0
- package/dist/runstate-stats.d.ts.map +1 -0
- package/dist/runstate-stats.js +359 -0
- package/dist/runstate-stats.js.map +1 -0
- package/dist/table.d.ts +26 -0
- package/dist/table.d.ts.map +1 -0
- package/dist/table.js +49 -0
- package/dist/table.js.map +1 -0
- package/package.json +1 -1
package/dist/table.d.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Column-aligned plain-text tables.
|
|
3
|
+
*
|
|
4
|
+
* Several commands print tabular output and each used to compute its own column widths
|
|
5
|
+
* and hand-pad — the same eight lines, re-derived. This is the one implementation they
|
|
6
|
+
* share; a new table is a call, not another copy.
|
|
7
|
+
*/
|
|
8
|
+
/** Column alignment. Numeric columns read right-aligned; everything else left. */
|
|
9
|
+
export type ColumnAlign = 'left' | 'right';
|
|
10
|
+
export interface TableOptions {
|
|
11
|
+
/** Per-column alignment, indexed like `headers`. Missing entries default to `left`. */
|
|
12
|
+
align?: ColumnAlign[];
|
|
13
|
+
/** Draw a `---` rule under the header row. */
|
|
14
|
+
separator?: boolean;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Render a table with each column padded to its widest cell.
|
|
18
|
+
*
|
|
19
|
+
* Cells are taken as already-printable text: a row shorter than `headers` is padded out,
|
|
20
|
+
* and a row LONGER than `headers` has its extra cells appended unpadded, since there is no
|
|
21
|
+
* column to size them against. Callers rendering untrusted text should sanitise it first —
|
|
22
|
+
* a control character makes `.length` disagree with what the terminal draws, which silently
|
|
23
|
+
* destroys the alignment this function exists to provide.
|
|
24
|
+
*/
|
|
25
|
+
export declare function renderTable(headers: string[], rows: string[][], options?: TableOptions): string;
|
|
26
|
+
//# sourceMappingURL=table.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../src/table.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,kFAAkF;AAClF,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,OAAO,CAAC;AAE3C,MAAM,WAAW,YAAY;IAC3B,uFAAuF;IACvF,KAAK,CAAC,EAAE,WAAW,EAAE,CAAC;IACtB,8CAA8C;IAC9C,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAaD;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CACzB,OAAO,EAAE,MAAM,EAAE,EACjB,IAAI,EAAE,MAAM,EAAE,EAAE,EAChB,OAAO,GAAE,YAAiB,GACzB,MAAM,CAkBR"}
|
package/dist/table.js
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Column-aligned plain-text tables.
|
|
4
|
+
*
|
|
5
|
+
* Several commands print tabular output and each used to compute its own column widths
|
|
6
|
+
* and hand-pad — the same eight lines, re-derived. This is the one implementation they
|
|
7
|
+
* share; a new table is a call, not another copy.
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.renderTable = renderTable;
|
|
11
|
+
/**
|
|
12
|
+
* Longest cell in column `index`, counting the header.
|
|
13
|
+
*
|
|
14
|
+
* Folded rather than spread into `Math.max(...)`: the row count is caller data — for
|
|
15
|
+
* `runstate stats` it is driven by how many milestone comments an issue has, which anyone
|
|
16
|
+
* who can comment controls — and a spread of ~124k arguments overflows the stack.
|
|
17
|
+
*/
|
|
18
|
+
function columnWidth(header, rows, index) {
|
|
19
|
+
return rows.reduce((width, row) => Math.max(width, (row[index] ?? '').length), header.length);
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Render a table with each column padded to its widest cell.
|
|
23
|
+
*
|
|
24
|
+
* Cells are taken as already-printable text: a row shorter than `headers` is padded out,
|
|
25
|
+
* and a row LONGER than `headers` has its extra cells appended unpadded, since there is no
|
|
26
|
+
* column to size them against. Callers rendering untrusted text should sanitise it first —
|
|
27
|
+
* a control character makes `.length` disagree with what the terminal draws, which silently
|
|
28
|
+
* destroys the alignment this function exists to provide.
|
|
29
|
+
*/
|
|
30
|
+
function renderTable(headers, rows, options = {}) {
|
|
31
|
+
const { align = [], separator = false } = options;
|
|
32
|
+
const widths = headers.map((header, i) => columnWidth(header, rows, i));
|
|
33
|
+
const pad = (cell, i) => {
|
|
34
|
+
if (i >= widths.length)
|
|
35
|
+
return cell;
|
|
36
|
+
return align[i] === 'right' ? cell.padStart(widths[i]) : cell.padEnd(widths[i]);
|
|
37
|
+
};
|
|
38
|
+
const line = (cells) => cells
|
|
39
|
+
.map((cell, i) => pad(cell, i))
|
|
40
|
+
.join(' ')
|
|
41
|
+
.trimEnd();
|
|
42
|
+
const out = [line(headers)];
|
|
43
|
+
if (separator)
|
|
44
|
+
out.push(widths.map((w) => '-'.repeat(w)).join(' '));
|
|
45
|
+
for (const row of rows)
|
|
46
|
+
out.push(line(row));
|
|
47
|
+
return out.join('\n');
|
|
48
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,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;SAC9B,IAAI,CAAC,IAAI,CAAC;SACV,OAAO,EAAE,CAAC;IAEf,MAAM,GAAG,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;IAC5B,IAAI,SAAS;QAAE,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IACrE,KAAK,MAAM,GAAG,IAAI,IAAI;QAAE,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;IAC5C,OAAO,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACxB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-dossier/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"description": "Create, verify, sign, publish, and run dossiers — portable, signed, versioned skills for any LLM tool. The dossier ⇄ Claude Code skill bridge (install-skill / skill-export).",
|
|
5
5
|
"main": "dist/cli.js",
|
|
6
6
|
"bin": {
|