Add e2e-test (not passed yet)

Refine readme
This commit is contained in:
vorotamoroz
2026-03-12 12:20:39 +09:00
parent fa14531599
commit 5d80258a77
16 changed files with 520 additions and 177 deletions

View File

@@ -237,22 +237,19 @@ export async function runCommand(options: CLIOptions, context: CLICommandContext
})
.map((entry: { rev: string }) => entry.rev);
const pastRevisionsText =
pastRevisions.length > 0 ? pastRevisions.map((rev: string) => ` rev: ${rev}`) : [" N/A"];
const out =
[
`ID: ${doc._id}`,
`Revision: ${doc._rev ?? ""}`,
`Conflicts: ${conflictsText}`,
`Filename: ${filename}`,
`Path: ${docPath}`,
`Size: ${doc.size}`,
`PastRevisions:`,
...pastRevisionsText,
`Chunks: ${children.length}`,
...children.map((id) => ` child: ${id}`),
].join("\n") + "\n";
process.stdout.write(out);
pastRevisions.length > 0 ? pastRevisions.map((rev: string) => `${rev}`) : ["N/A"];
const out = {
id: doc._id,
revision: doc._rev ?? "",
conflicts: conflictsText,
filename: filename,
path: docPath,
size: doc.size,
revisions: pastRevisionsText,
chunks: children.length,
children: children,
};
process.stdout.write(JSON.stringify(out, null, 2) + "\n");
return true;
}