A- Add more tests.

- Object Storage support has also been confirmed (and fixed) in CLI.
This commit is contained in:
vorotamoroz
2026-03-12 18:20:55 +09:00
parent 5d80258a77
commit d4aedf59f3
13 changed files with 892 additions and 281 deletions

View File

@@ -151,7 +151,8 @@ export async function runCommand(options: CLIOptions, context: CLICommandContext
if (body.type === "text/plain") {
process.stdout.write(await body.text());
} else {
process.stdout.write(Buffer.from(await body.arrayBuffer()));
const buffer = Buffer.from(await body.arrayBuffer());
process.stdout.write(new Uint8Array(buffer));
}
return true;
}
@@ -178,7 +179,8 @@ export async function runCommand(options: CLIOptions, context: CLICommandContext
if (body.type === "text/plain") {
process.stdout.write(await body.text());
} else {
process.stdout.write(Buffer.from(await body.arrayBuffer()));
const buffer = Buffer.from(await body.arrayBuffer());
process.stdout.write(new Uint8Array(buffer));
}
return true;
}
@@ -236,8 +238,7 @@ export async function runCommand(options: CLIOptions, context: CLICommandContext
return entry.status === "available";
})
.map((entry: { rev: string }) => entry.rev);
const pastRevisionsText =
pastRevisions.length > 0 ? pastRevisions.map((rev: string) => `${rev}`) : ["N/A"];
const pastRevisionsText = pastRevisions.length > 0 ? pastRevisions.map((rev: string) => `${rev}`) : ["N/A"];
const out = {
id: doc._id,
revision: doc._rev ?? "",