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

Function getMessage

apps/cli/src/base-program.ts:85–106  ·  view source on GitHub ↗
(response: Response)

Source from the content-addressed store, hash-verified

83 }
84
85 protected getMessage(response: Response): string {
86 const message = response.data as MessageResponse;
87 if (process.env.BW_RAW === "true") {
88 return message.raw;
89 }
90
91 let out = "";
92 if (message.title != null) {
93 if (message.noColor) {
94 out = message.title;
95 } else {
96 out = chalk.greenBright(message.title);
97 }
98 }
99 if (message.message != null) {
100 if (message.title != null) {
101 out += "\n";
102 }
103 out += message.message;
104 }
105 return out.trim() === "" ? null : out;
106 }
107
108 protected async exitIfAuthed() {
109 const authed = await firstValueFrom(

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected