()
| 4 | |
| 5 | export 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 | } |
nothing calls this directly
no test coverage detected