@basou/cli 0.57.0 → 0.57.1
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 +10 -5
- package/dist/index.js.map +1 -1
- package/dist/program.js +10 -5
- package/dist/program.js.map +1 -1
- package/package.json +2 -2
package/dist/program.js
CHANGED
|
@@ -12055,6 +12055,13 @@ import {
|
|
|
12055
12055
|
resolveSessionId as resolveSessionId5,
|
|
12056
12056
|
verifyEventsChain
|
|
12057
12057
|
} from "@basou/core";
|
|
12058
|
+
var PASSING_STATUSES = /* @__PURE__ */ new Set([
|
|
12059
|
+
"verified",
|
|
12060
|
+
"unchained",
|
|
12061
|
+
"empty",
|
|
12062
|
+
"incomplete",
|
|
12063
|
+
"in_progress"
|
|
12064
|
+
]);
|
|
12058
12065
|
function registerVerifyCommand(program) {
|
|
12059
12066
|
program.command("verify").description("Verify the tamper-evidence hash chain of sessions' event logs (read-only)").option("--session <id>", "Verify a single session (unique id prefix accepted)").option("--all", "Verify every session (the default when --session is omitted)").option("--json", "Output the verdicts as JSON").option("-v, --verbose", "Show error causes").action(async (opts) => {
|
|
12060
12067
|
await runVerify(opts);
|
|
@@ -12089,8 +12096,6 @@ async function doRunVerify(options, ctx) {
|
|
|
12089
12096
|
...verdict.sessionYamlInvalid === true ? { session_yaml_invalid: true } : {}
|
|
12090
12097
|
});
|
|
12091
12098
|
}
|
|
12092
|
-
const tamperedCount = rows.filter((r) => r.status === "tampered").length;
|
|
12093
|
-
const unsupportedCount = rows.filter((r) => r.status === "unsupported").length;
|
|
12094
12099
|
if (options.json === true) {
|
|
12095
12100
|
console.log(JSON.stringify(rows, null, 2));
|
|
12096
12101
|
} else {
|
|
@@ -12100,10 +12105,10 @@ async function doRunVerify(options, ctx) {
|
|
|
12100
12105
|
}
|
|
12101
12106
|
const tally = (status) => rows.filter((r) => r.status === status).length;
|
|
12102
12107
|
console.log(
|
|
12103
|
-
`Sessions: ${rows.length} total \u2014 ${tally("verified")} verified, ${tally("unchained")} unchained, ${tally("empty")} empty, ${tally("incomplete")} incomplete, ${tally("in_progress")} in_progress, ${
|
|
12108
|
+
`Sessions: ${rows.length} total \u2014 ${tally("verified")} verified, ${tally("unchained")} unchained, ${tally("empty")} empty, ${tally("incomplete")} incomplete, ${tally("in_progress")} in_progress, ${tally("unsupported")} unsupported, ${tally("tampered")} tampered`
|
|
12104
12109
|
);
|
|
12105
12110
|
}
|
|
12106
|
-
if (
|
|
12111
|
+
if (rows.some((r) => !PASSING_STATUSES.has(r.status))) {
|
|
12107
12112
|
process.exitCode = 1;
|
|
12108
12113
|
}
|
|
12109
12114
|
}
|
|
@@ -14118,7 +14123,7 @@ async function assertWorkspaceInitialized15(basouRoot) {
|
|
|
14118
14123
|
function readBuildStamp() {
|
|
14119
14124
|
if (false) return void 0;
|
|
14120
14125
|
try {
|
|
14121
|
-
return JSON.parse('{"version":"0.57.
|
|
14126
|
+
return JSON.parse('{"version":"0.57.1","commit":"0b14831","committedAt":"2026-10-01T11:07:24+09:00"}');
|
|
14122
14127
|
} catch {
|
|
14123
14128
|
return void 0;
|
|
14124
14129
|
}
|