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