@basou/cli 0.70.0 → 0.71.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/index.js +52 -11
- package/dist/index.js.map +1 -1
- package/dist/program.js +52 -11
- package/dist/program.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -2268,7 +2268,13 @@ var INPUT_KEYS = /* @__PURE__ */ new Set([
|
|
|
2268
2268
|
"text",
|
|
2269
2269
|
"model",
|
|
2270
2270
|
"self_reported",
|
|
2271
|
-
"triggers"
|
|
2271
|
+
"triggers",
|
|
2272
|
+
"status",
|
|
2273
|
+
"redirects",
|
|
2274
|
+
"final_url",
|
|
2275
|
+
"words",
|
|
2276
|
+
"count",
|
|
2277
|
+
"capture"
|
|
2272
2278
|
]);
|
|
2273
2279
|
var SHAPED_PLACES = [
|
|
2274
2280
|
/^measure_digest$/,
|
|
@@ -2599,6 +2605,7 @@ function diffLines(diff, more) {
|
|
|
2599
2605
|
function shownValue(value) {
|
|
2600
2606
|
if (value === null) return "not measured";
|
|
2601
2607
|
if (typeof value === "number") return String(Math.round(value * 1e4) / 1e4);
|
|
2608
|
+
if (Array.isArray(value)) return String(value.length);
|
|
2602
2609
|
return displayPath3(value);
|
|
2603
2610
|
}
|
|
2604
2611
|
function repoLines(m) {
|
|
@@ -2619,9 +2626,19 @@ function repoLines(m) {
|
|
|
2619
2626
|
`last commit ${measured("last_commit", String) ?? "none"}`,
|
|
2620
2627
|
`commits ${measured("commits", String) ?? "not measured"}`,
|
|
2621
2628
|
`files ${measured("files", String) ?? "not measured"}`,
|
|
2622
|
-
`uncommitted ${measured("uncommitted", String) ?? "not measured"}
|
|
2623
|
-
`behind origin/main ${measured("behind_main", String) ?? "(no origin/main)"}`
|
|
2629
|
+
`uncommitted ${measured("uncommitted", String) ?? "not measured"}`
|
|
2624
2630
|
];
|
|
2631
|
+
const base = measured("base", (b) => displayPath3(String(b)));
|
|
2632
|
+
if (base === void 0) {
|
|
2633
|
+
parts.push("no base (origin/HEAD names no branch, and there is no origin/main)");
|
|
2634
|
+
} else {
|
|
2635
|
+
parts.push(
|
|
2636
|
+
`base ${base}`,
|
|
2637
|
+
`behind ${measured("behind", String) ?? "not measured"}`,
|
|
2638
|
+
`ahead ${measured("ahead", String) ?? "not measured"}`,
|
|
2639
|
+
`fetched ${measured("fetched_at", String) ?? "not known"}`
|
|
2640
|
+
);
|
|
2641
|
+
}
|
|
2625
2642
|
return ` ${displayPath3(repo.path)}${name} ${parts.join(", ")}`;
|
|
2626
2643
|
});
|
|
2627
2644
|
}
|
|
@@ -2737,8 +2754,9 @@ function printMeasurementText(m, hasRecords2) {
|
|
|
2737
2754
|
lines.push("", "Measures:");
|
|
2738
2755
|
for (const [id, measure] of measures) {
|
|
2739
2756
|
const unit = measure.value === null ? "" : ` ${displayPath3(measure.unit)}`;
|
|
2740
|
-
const
|
|
2741
|
-
|
|
2757
|
+
const listed = Array.isArray(measure.value) ? " (paths in --json)" : "";
|
|
2758
|
+
const lane = measure.lane === void 0 ? "" : ` [${measure.lane.join(", ")}]`;
|
|
2759
|
+
lines.push(` ${id.padEnd(width)} ${shownValue(measure.value)}${unit}${listed}${lane}`);
|
|
2742
2760
|
}
|
|
2743
2761
|
}
|
|
2744
2762
|
const ratios = Object.entries(m.ratios);
|
|
@@ -13854,6 +13872,17 @@ var BOARD_HTML = `<!doctype html>
|
|
|
13854
13872
|
if (typeof value === 'string') return value;
|
|
13855
13873
|
return JSON.stringify(value);
|
|
13856
13874
|
}
|
|
13875
|
+
// An http value with each of its words beside what it says of it, in the
|
|
13876
|
+
// order declared. Written out, not built as an object: an object would put a
|
|
13877
|
+
// word that reads as a number first.
|
|
13878
|
+
function withWords(value, words) {
|
|
13879
|
+
return '{' + Object.keys(value).map(function (k) {
|
|
13880
|
+
var v = k === 'words'
|
|
13881
|
+
? '{' + words.map(function (w) { return JSON.stringify(w.word) + ':' + JSON.stringify(w.found); }).join(',') + '}'
|
|
13882
|
+
: JSON.stringify(value[k]);
|
|
13883
|
+
return JSON.stringify(k) + ':' + v;
|
|
13884
|
+
}).join(',') + '}';
|
|
13885
|
+
}
|
|
13857
13886
|
function stateName(state) { return S.states[state] || state; }
|
|
13858
13887
|
function setStatus(message, isErr) {
|
|
13859
13888
|
var s = $('status');
|
|
@@ -13940,7 +13969,7 @@ var BOARD_HTML = `<!doctype html>
|
|
|
13940
13969
|
} else {
|
|
13941
13970
|
var rows = s.observed.map(function (o) {
|
|
13942
13971
|
var value;
|
|
13943
|
-
if (o.value !== null) value = shown(o.value);
|
|
13972
|
+
if (o.value !== null) value = o.words ? withWords(o.value, o.words) : shown(o.value);
|
|
13944
13973
|
else if (o.previous && o.previous.status === 'value') value = fill(S.observed.missing, { value: shown(o.previous.value) });
|
|
13945
13974
|
else if (o.previous && o.previous.status === 'unreadable') value = S.observed.missingPreviousUnreadable;
|
|
13946
13975
|
else value = S.observed.missingNoPrevious;
|
|
@@ -14287,6 +14316,13 @@ var BOARD_HTML = `<!doctype html>
|
|
|
14287
14316
|
if (lane.measures.length > 0) {
|
|
14288
14317
|
body.push(el('div', { class: 'muted', text: S.lane.measures }));
|
|
14289
14318
|
body.push(el('ul', null, lane.measures.map(function (m) {
|
|
14319
|
+
// The paths of a file_paths measure: how many, with the list folded.
|
|
14320
|
+
if (Array.isArray(m.value)) {
|
|
14321
|
+
return el('li', null, [el('details', null, [
|
|
14322
|
+
el('summary', { text: m.id + ': ' + num(m.value.length) + ' ' + m.unit }),
|
|
14323
|
+
el('ul', null, m.value.map(function (p) { return el('li', { text: p }); }))
|
|
14324
|
+
])]);
|
|
14325
|
+
}
|
|
14290
14326
|
return el('li', { text: m.id + ': ' + num(m.value) + (m.value === null ? '' : ' ' + m.unit) });
|
|
14291
14327
|
})));
|
|
14292
14328
|
}
|
|
@@ -14409,12 +14445,14 @@ var BOARD_HTML = `<!doctype html>
|
|
|
14409
14445
|
}
|
|
14410
14446
|
function liveRepos(l) {
|
|
14411
14447
|
var missing = missingIn(l);
|
|
14412
|
-
var labels = [S.live.repo, S.live.branch, S.live.head, S.live.lastCommit, S.live.commits, S.live.uncommitted, S.live.
|
|
14413
|
-
var
|
|
14448
|
+
var labels = [S.live.repo, S.live.branch, S.live.head, S.live.lastCommit, S.live.commits, S.live.uncommitted, S.live.base, S.live.behind, S.live.ahead, S.live.fetchedAt];
|
|
14449
|
+
var numeric = [4, 5, 7, 8];
|
|
14450
|
+
var head = el('tr', null, labels.map(function (label, i) { return el('th', { class: numeric.indexOf(i) !== -1 ? 'n' : '', text: label }); }));
|
|
14414
14451
|
var rows = l.repos.map(function (r) {
|
|
14415
14452
|
var at = 'repos[' + r.path + ']';
|
|
14416
14453
|
// A null the measurement says it could not measure, or one that means
|
|
14417
|
-
// so (a detached HEAD, no commit yet, no
|
|
14454
|
+
// so (a detached HEAD, no commit yet, no base, no fetch of it on
|
|
14455
|
+
// record), drawn as '-'.
|
|
14418
14456
|
var value = function (field, v, show) {
|
|
14419
14457
|
if (v !== null) return show(v);
|
|
14420
14458
|
return missing(at) || missing(at + '.' + field) ? S.tiles.notMeasured : '-';
|
|
@@ -14426,7 +14464,10 @@ var BOARD_HTML = `<!doctype html>
|
|
|
14426
14464
|
el('td', { text: value('last_commit', r.last_commit, when) }),
|
|
14427
14465
|
el('td', { class: 'n', text: num(r.commits) }),
|
|
14428
14466
|
el('td', { class: 'n', text: num(r.uncommitted) }),
|
|
14429
|
-
el('td', {
|
|
14467
|
+
el('td', { text: value('base', r.base, String) }),
|
|
14468
|
+
el('td', { class: 'n', text: value('behind', r.behind, num) }),
|
|
14469
|
+
el('td', { class: 'n', text: value('ahead', r.ahead, num) }),
|
|
14470
|
+
el('td', { text: value('fetched_at', r.fetched_at, when) })
|
|
14430
14471
|
]);
|
|
14431
14472
|
});
|
|
14432
14473
|
return section(S.live.repos, false, [el('div', { class: 'scroll' }, [el('table', { class: 'grid' }, [head].concat(rows))])]);
|
|
@@ -16090,7 +16131,7 @@ function installExperimentalNotice(program2, names = EXPERIMENTAL_COMMANDS, writ
|
|
|
16090
16131
|
function readBuildStamp() {
|
|
16091
16132
|
if (false) return void 0;
|
|
16092
16133
|
try {
|
|
16093
|
-
return JSON.parse('{"version":"0.
|
|
16134
|
+
return JSON.parse('{"version":"0.71.0","commit":"2c60650","committedAt":"2026-10-18T23:50:50+09:00"}');
|
|
16094
16135
|
} catch {
|
|
16095
16136
|
return void 0;
|
|
16096
16137
|
}
|