@basou/cli 0.73.0 → 0.74.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 +64 -32
- package/dist/index.js.map +1 -1
- package/dist/program.js +64 -32
- package/dist/program.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -13981,6 +13981,14 @@ var BOARD_HTML = `<!doctype html>
|
|
|
13981
13981
|
table.matrix td.cell { font-size: 16px; padding: 4px 2px; }
|
|
13982
13982
|
table.matrix th:first-child { max-width: 10em; overflow-wrap: anywhere; }
|
|
13983
13983
|
.stage-meanings { display: block; }
|
|
13984
|
+
/* A table wider than the page scrolls; its notes wrap at the width of
|
|
13985
|
+
the scroll they are in (100vw where container units are not known,
|
|
13986
|
+
which counts a page scrollbar too) and stay at its left edge, so none
|
|
13987
|
+
is cut off. The cell keeps no right padding, which a sticky note could
|
|
13988
|
+
not cross. */
|
|
13989
|
+
.scroll { container-type: inline-size; }
|
|
13990
|
+
tr.notes td { padding-right: 0; }
|
|
13991
|
+
tr.notes ul.sub { position: sticky; left: 0; max-width: calc(100vw - 32px); max-width: 100cqw; }
|
|
13984
13992
|
}
|
|
13985
13993
|
.st::before { display: inline-block; width: 1.2em; }
|
|
13986
13994
|
.st.done::before { content: "\\25CF"; color: var(--done); }
|
|
@@ -14039,6 +14047,18 @@ var BOARD_HTML = `<!doctype html>
|
|
|
14039
14047
|
(function () {
|
|
14040
14048
|
var S = null;
|
|
14041
14049
|
var lang = 'en';
|
|
14050
|
+
// The workspace of a portfolio the page is opened for (?ws=<key>), set
|
|
14051
|
+
// before anything is fetched: its board is read from its scoped routes, and
|
|
14052
|
+
// the page's links keep it. Null in single mode.
|
|
14053
|
+
var WS = null;
|
|
14054
|
+
function apiPath(sub) {
|
|
14055
|
+
return (WS === null ? '/api/' : '/api/ws/' + encodeURIComponent(WS) + '/') + sub;
|
|
14056
|
+
}
|
|
14057
|
+
function boardHref(query) {
|
|
14058
|
+
var parts = WS === null ? [] : ['ws=' + encodeURIComponent(WS)];
|
|
14059
|
+
if (query) parts.push(query);
|
|
14060
|
+
return '/board' + (parts.length > 0 ? '?' + parts.join('&') : '');
|
|
14061
|
+
}
|
|
14042
14062
|
function $(id) { return document.getElementById(id); }
|
|
14043
14063
|
function clear(node) { while (node.firstChild) node.removeChild(node.firstChild); }
|
|
14044
14064
|
function el(tag, attrs, children) {
|
|
@@ -14208,19 +14228,19 @@ var BOARD_HTML = `<!doctype html>
|
|
|
14208
14228
|
var page = d.page;
|
|
14209
14229
|
var list = page.records || [];
|
|
14210
14230
|
if (list.length > 0) recordLinks(nav, page, list);
|
|
14211
|
-
nav.appendChild(el('a', { href: '
|
|
14231
|
+
nav.appendChild(el('a', { href: boardHref('live=1'), text: S.live.measureNow }));
|
|
14212
14232
|
}
|
|
14213
14233
|
|
|
14214
14234
|
function recordLinks(nav, page, list) {
|
|
14215
14235
|
var link = function (id, label) {
|
|
14216
|
-
return el('a', { href: '
|
|
14236
|
+
return el('a', { href: boardHref('record=' + encodeURIComponent(id)), text: label });
|
|
14217
14237
|
};
|
|
14218
14238
|
// Around the record asked for, whether or not it could be drawn.
|
|
14219
14239
|
if (page.older) nav.appendChild(link(page.older, S.older));
|
|
14220
14240
|
if (page.newer) nav.appendChild(link(page.newer, S.newer));
|
|
14221
|
-
nav.appendChild(el('a', { href: '
|
|
14241
|
+
nav.appendChild(el('a', { href: boardHref(''), text: S.latest }));
|
|
14222
14242
|
var select = el('select', {
|
|
14223
|
-
onchange: function () { location.href = '
|
|
14243
|
+
onchange: function () { location.href = boardHref('record=' + encodeURIComponent(select.value)); }
|
|
14224
14244
|
});
|
|
14225
14245
|
var listed = list.some(function (r) { return r.id === page.id; });
|
|
14226
14246
|
if (!listed) {
|
|
@@ -14575,8 +14595,17 @@ var BOARD_HTML = `<!doctype html>
|
|
|
14575
14595
|
tile(S.effort.perDay, hm(perDay), perDaySub),
|
|
14576
14596
|
tile(S.effort.outputTokens, num(e.output_tokens), tokens)
|
|
14577
14597
|
]);
|
|
14598
|
+
// A repo by its name, as the repos table draws it: a workspace that is
|
|
14599
|
+
// one repo is at the path '.'. The board measured on the spot holds its
|
|
14600
|
+
// repos as a list, a record as { list } or null.
|
|
14601
|
+
var names = Object.create(null);
|
|
14602
|
+
var repos = !b.repos ? [] : Array.isArray(b.repos) ? b.repos : b.repos.list;
|
|
14603
|
+
repos.forEach(function (r) {
|
|
14604
|
+
if (r.name !== null) names[r.path] = r.name;
|
|
14605
|
+
});
|
|
14578
14606
|
var commits = e.commits === null ? S.effort.notMeasured : e.commits.map(function (c) {
|
|
14579
|
-
|
|
14607
|
+
var name = Object.prototype.hasOwnProperty.call(names, c.repo) ? names[c.repo] : c.repo;
|
|
14608
|
+
return name + ' ' + num(c.count);
|
|
14580
14609
|
}).join(' / ');
|
|
14581
14610
|
var children = [tiles, el('p', { class: 'muted', text: fill(S.effort.commits, { list: commits }) })];
|
|
14582
14611
|
var days = e.daily || [];
|
|
@@ -14970,9 +14999,9 @@ var BOARD_HTML = `<!doctype html>
|
|
|
14970
14999
|
clear(nav);
|
|
14971
15000
|
// Asked for with ?live=1: lead back to the records, when there are any.
|
|
14972
15001
|
if (why === null) {
|
|
14973
|
-
getJson('
|
|
15002
|
+
getJson(apiPath('board')).then(function (b) {
|
|
14974
15003
|
var list = b && b.page && b.page.records ? b.page.records : [];
|
|
14975
|
-
if (drawn === liveDrawn && list.length > 0) nav.appendChild(el('a', { href: '
|
|
15004
|
+
if (drawn === liveDrawn && list.length > 0) nav.appendChild(el('a', { href: boardHref(''), text: S.live.toRecords }));
|
|
14976
15005
|
}).catch(function () {});
|
|
14977
15006
|
}
|
|
14978
15007
|
var root = $('board');
|
|
@@ -14995,16 +15024,17 @@ var BOARD_HTML = `<!doctype html>
|
|
|
14995
15024
|
// Measuring takes seconds, so the page says so until it is done.
|
|
14996
15025
|
function loadLive(why) {
|
|
14997
15026
|
setStatus(S ? S.live.measuring : '...', false);
|
|
14998
|
-
getJson('
|
|
15027
|
+
getJson(apiPath('board/live')).then(function (d) { drawLive(d, why); }).catch(failed);
|
|
14999
15028
|
}
|
|
15000
15029
|
|
|
15001
15030
|
var params = new URLSearchParams(location.search);
|
|
15031
|
+
WS = params.get('ws');
|
|
15002
15032
|
var record = params.get('record');
|
|
15003
15033
|
if (params.get('live') !== null) {
|
|
15004
15034
|
loadLive(null);
|
|
15005
15035
|
} else {
|
|
15006
15036
|
setStatus('...', false);
|
|
15007
|
-
getJson('
|
|
15037
|
+
getJson(apiPath('board' + (record ? '/' + encodeURIComponent(record) : ''))).then(draw).catch(failed);
|
|
15008
15038
|
}
|
|
15009
15039
|
})();
|
|
15010
15040
|
</script>
|
|
@@ -15270,7 +15300,7 @@ var VIEW_HTML = `<!doctype html>
|
|
|
15270
15300
|
state.canAct = true;
|
|
15271
15301
|
document.body.classList.remove('landing');
|
|
15272
15302
|
$('btn-back').style.display = 'none';
|
|
15273
|
-
|
|
15303
|
+
$('board-link').href = '/board';
|
|
15274
15304
|
$('board-link').style.display = '';
|
|
15275
15305
|
updateActionBar();
|
|
15276
15306
|
buildTabs();
|
|
@@ -15284,6 +15314,8 @@ var VIEW_HTML = `<!doctype html>
|
|
|
15284
15314
|
state.canAct = false;
|
|
15285
15315
|
document.body.classList.add('landing');
|
|
15286
15316
|
$('btn-back').style.display = 'none';
|
|
15317
|
+
// No workspace is open: there is no board to lead to.
|
|
15318
|
+
$('board-link').style.display = 'none';
|
|
15287
15319
|
setStatus('', false);
|
|
15288
15320
|
clear($('tabs'));
|
|
15289
15321
|
updateActionBar();
|
|
@@ -15398,6 +15430,10 @@ var VIEW_HTML = `<!doctype html>
|
|
|
15398
15430
|
state.canAct = true;
|
|
15399
15431
|
document.body.classList.remove('landing');
|
|
15400
15432
|
$('btn-back').style.display = '';
|
|
15433
|
+
// The board of the workspace open, read from its scoped routes. The cards
|
|
15434
|
+
// of the landing carry none of a board's figures.
|
|
15435
|
+
$('board-link').href = '/board?ws=' + encodeURIComponent(key);
|
|
15436
|
+
$('board-link').style.display = '';
|
|
15401
15437
|
updateActionBar();
|
|
15402
15438
|
setStatus('workspace: ' + label, false);
|
|
15403
15439
|
buildTabs();
|
|
@@ -15805,7 +15841,7 @@ async function handleGet(res, pathname, deps) {
|
|
|
15805
15841
|
sendHtml(res, VIEW_HTML);
|
|
15806
15842
|
return;
|
|
15807
15843
|
}
|
|
15808
|
-
if (pathname === "/board"
|
|
15844
|
+
if (pathname === "/board") {
|
|
15809
15845
|
sendHtml(res, BOARD_HTML);
|
|
15810
15846
|
return;
|
|
15811
15847
|
}
|
|
@@ -15826,8 +15862,8 @@ async function handleGet(res, pathname, deps) {
|
|
|
15826
15862
|
ws,
|
|
15827
15863
|
deps.nowProvider,
|
|
15828
15864
|
remoteUrlOf(deps),
|
|
15829
|
-
|
|
15830
|
-
|
|
15865
|
+
ws.board,
|
|
15866
|
+
ws.boardLive
|
|
15831
15867
|
)) {
|
|
15832
15868
|
sendError(res, 404, "Not found");
|
|
15833
15869
|
}
|
|
@@ -15841,8 +15877,8 @@ async function handleGet(res, pathname, deps) {
|
|
|
15841
15877
|
primaryWorkspace(deps),
|
|
15842
15878
|
deps.nowProvider,
|
|
15843
15879
|
remoteUrlOf(deps),
|
|
15844
|
-
|
|
15845
|
-
|
|
15880
|
+
flatBoardOf(deps),
|
|
15881
|
+
flatBoardLiveOf(deps)
|
|
15846
15882
|
)) {
|
|
15847
15883
|
sendError(res, 404, "Not found");
|
|
15848
15884
|
}
|
|
@@ -15850,11 +15886,11 @@ async function handleGet(res, pathname, deps) {
|
|
|
15850
15886
|
}
|
|
15851
15887
|
sendError(res, 404, "Not found");
|
|
15852
15888
|
}
|
|
15853
|
-
function
|
|
15854
|
-
return deps.mode === "single" ? deps.board : void 0;
|
|
15889
|
+
function flatBoardOf(deps) {
|
|
15890
|
+
return deps.mode === "single" ? primaryWorkspace(deps).board : void 0;
|
|
15855
15891
|
}
|
|
15856
|
-
function
|
|
15857
|
-
return deps.mode === "single" ? deps.boardLive : void 0;
|
|
15892
|
+
function flatBoardLiveOf(deps) {
|
|
15893
|
+
return deps.mode === "single" ? primaryWorkspace(deps).boardLive : void 0;
|
|
15858
15894
|
}
|
|
15859
15895
|
function remoteUrlOf(deps) {
|
|
15860
15896
|
return deps.remoteUrlOf ?? tryRemoteUrl;
|
|
@@ -16373,14 +16409,13 @@ async function buildSingleDeps(ctx, cwd) {
|
|
|
16373
16409
|
const repositoryRoot = await resolveBasouRootForCommand(cwd, "view");
|
|
16374
16410
|
const paths = basouPaths25(repositoryRoot);
|
|
16375
16411
|
await assertWorkspaceInitialized16(paths.root);
|
|
16376
|
-
const
|
|
16412
|
+
const built = await buildWorkspaceEntry(repositoryRoot, ctx);
|
|
16413
|
+
const entry = built.board !== void 0 ? built : { ...built, board: { why: "no_board" }, boardLive: liveBoardOf(repositoryRoot, ctx) };
|
|
16377
16414
|
return {
|
|
16378
16415
|
workspaces: [entry],
|
|
16379
16416
|
mode: "single",
|
|
16380
16417
|
nowProvider: nowProviderOf(ctx),
|
|
16381
|
-
...ctx.remoteUrlOf !== void 0 ? { remoteUrlOf: ctx.remoteUrlOf } : {}
|
|
16382
|
-
board: await viewBoardOf(repositoryRoot, paths),
|
|
16383
|
-
boardLive: liveBoardOf(repositoryRoot, ctx)
|
|
16418
|
+
...ctx.remoteUrlOf !== void 0 ? { remoteUrlOf: ctx.remoteUrlOf } : {}
|
|
16384
16419
|
};
|
|
16385
16420
|
}
|
|
16386
16421
|
function liveBoardOf(root, ctx) {
|
|
@@ -16401,13 +16436,8 @@ function sharedWhileRunning(run) {
|
|
|
16401
16436
|
return running;
|
|
16402
16437
|
};
|
|
16403
16438
|
}
|
|
16404
|
-
|
|
16405
|
-
|
|
16406
|
-
try {
|
|
16407
|
-
own = (await readManifest19(paths)).repos?.find((repo) => repo.path === ".");
|
|
16408
|
-
} catch {
|
|
16409
|
-
own = void 0;
|
|
16410
|
-
}
|
|
16439
|
+
function viewBoardOf(root, manifest) {
|
|
16440
|
+
const own = manifest.repos?.find((repo) => repo.path === ".");
|
|
16411
16441
|
if (own?.visibility !== "private") return { why: "no_board" };
|
|
16412
16442
|
return { recordsDir: join17(root, dirname9(DEFAULT_BOARD_PATH), "records") };
|
|
16413
16443
|
}
|
|
@@ -16449,7 +16479,9 @@ async function buildWorkspaceEntry(repoRoot, ctx, labelOverride) {
|
|
|
16449
16479
|
paths,
|
|
16450
16480
|
repoRoot,
|
|
16451
16481
|
importCtx,
|
|
16452
|
-
initialized: true
|
|
16482
|
+
initialized: true,
|
|
16483
|
+
board: viewBoardOf(repoRoot, manifest),
|
|
16484
|
+
boardLive: liveBoardOf(repoRoot, ctx)
|
|
16453
16485
|
};
|
|
16454
16486
|
} catch (error) {
|
|
16455
16487
|
const notFound = error instanceof Error && error.message === "YAML file not found";
|
|
@@ -16563,7 +16595,7 @@ function installExperimentalNotice(program2, names = EXPERIMENTAL_COMMANDS, writ
|
|
|
16563
16595
|
function readBuildStamp() {
|
|
16564
16596
|
if (false) return void 0;
|
|
16565
16597
|
try {
|
|
16566
|
-
return JSON.parse('{"version":"0.
|
|
16598
|
+
return JSON.parse('{"version":"0.74.0","commit":"31f16be","committedAt":"2026-10-23T12:42:48+09:00"}');
|
|
16567
16599
|
} catch {
|
|
16568
16600
|
return void 0;
|
|
16569
16601
|
}
|