MCPcopy Create free account
hub / github.com/bitwarden/clients / run

Method run

apps/cli/src/commands/encode.command.ts:6–14  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4
5export class EncodeCommand {
6 async run(): Promise<Response> {
7 if (process.stdin.isTTY) {
8 return Response.badRequest("No stdin was piped in.");
9 }
10 const input = await CliUtils.readStdin();
11 const b64 = Buffer.from(input, "utf8").toString("base64");
12 const res = new StringResponse(b64);
13 return Response.success(res);
14 }
15}

Callers

nothing calls this directly

Calls 5

badRequestMethod · 0.80
readStdinMethod · 0.80
successMethod · 0.80
toStringMethod · 0.65
fromMethod · 0.45

Tested by

no test coverage detected