@membank/cli 0.11.0 → 0.11.2
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.mjs +12 -3
- package/package.json +4 -4
package/dist/index.mjs
CHANGED
|
@@ -457,7 +457,12 @@ function synthesizeShowCommand(opts, formatter) {
|
|
|
457
457
|
return;
|
|
458
458
|
}
|
|
459
459
|
const scope = opts.scope ?? "global";
|
|
460
|
-
|
|
460
|
+
let resolvedScope = scope;
|
|
461
|
+
if (scope !== "global" && !/^[0-9a-f]{16}$/.test(scope)) {
|
|
462
|
+
const project = new ProjectRepository(db).getByName(scope);
|
|
463
|
+
if (project !== void 0) resolvedScope = project.scopeHash;
|
|
464
|
+
}
|
|
465
|
+
const row = db.db.prepare("SELECT * FROM syntheses WHERE scope = ? ORDER BY synthesized_at DESC LIMIT 1").get(resolvedScope);
|
|
461
466
|
if (row === void 0) {
|
|
462
467
|
if (formatter.isJson) process.stdout.write(`${JSON.stringify(null)}\n`);
|
|
463
468
|
else process.stdout.write(`No synthesis found for scope: ${scope}\n`);
|
|
@@ -483,7 +488,10 @@ function synthesizeStatusCommand(formatter) {
|
|
|
483
488
|
else process.stdout.write("No synthesis data available.\n");
|
|
484
489
|
return;
|
|
485
490
|
}
|
|
486
|
-
const rows = db.db.prepare(
|
|
491
|
+
const rows = db.db.prepare(`SELECT s.*, p.name AS project_name
|
|
492
|
+
FROM syntheses s
|
|
493
|
+
LEFT JOIN projects p ON p.scope_hash = s.scope
|
|
494
|
+
ORDER BY COALESCE(p.name, s.scope)`).all();
|
|
487
495
|
if (formatter.isJson) {
|
|
488
496
|
process.stdout.write(`${JSON.stringify(rows)}\n`);
|
|
489
497
|
return;
|
|
@@ -494,10 +502,11 @@ function synthesizeStatusCommand(formatter) {
|
|
|
494
502
|
}
|
|
495
503
|
process.stdout.write("\n");
|
|
496
504
|
for (const row of rows) {
|
|
505
|
+
const displayScope = row.project_name ?? row.scope;
|
|
497
506
|
const inFlight = row.in_flight_since !== null ? " [in-flight]" : "";
|
|
498
507
|
const synthesized = row.synthesized_at !== null ? new Date(row.synthesized_at).toLocaleString() : "(never)";
|
|
499
508
|
const expires = row.expires_at !== null ? new Date(row.expires_at).toLocaleString() : "(none)";
|
|
500
|
-
process.stdout.write(` ${
|
|
509
|
+
process.stdout.write(` ${displayScope}${inFlight}\n`);
|
|
501
510
|
process.stdout.write(` synthesized_at: ${synthesized}\n`);
|
|
502
511
|
process.stdout.write(` expires_at: ${expires}\n`);
|
|
503
512
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@membank/cli",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
"commander": "^14.0.3",
|
|
22
22
|
"ora": "^9.4.0",
|
|
23
23
|
"zod": "^4.4.3",
|
|
24
|
-
"@membank/core": "0.9.
|
|
25
|
-
"@membank/dashboard": "0.5.
|
|
26
|
-
"@membank/mcp": "0.12.
|
|
24
|
+
"@membank/core": "0.9.4",
|
|
25
|
+
"@membank/dashboard": "0.5.5",
|
|
26
|
+
"@membank/mcp": "0.12.2"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@types/node": "^25.6.0",
|