1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-22 20:34:04 +00:00

PM-919 download a file using get send

This commit is contained in:
voommen-livefront
2025-03-04 15:04:13 -06:00
parent 56c8c2ccc8
commit 07f119d003
3 changed files with 46 additions and 1 deletions

View File

@@ -163,7 +163,15 @@ export class SendProgram extends BaseProgram {
return new Command("get")
.arguments("<id>")
.description("Get Sends owned by you.")
.option("--output <output>", "Output directory or filename for attachment.")
.option("--file", "Specifies to return the file content of a Send")
.option("--password <password>", "Password needed to access the Send.")
.option("--passwordenv <passwordenv>", "Environment variable storing the Send's password")
.option(
"--passwordfile <passwordfile>",
"Path to a file containing the Sends password as its first line",
)
.option("--obj", "Return the Send's json object rather than the Send's content")
.option("--output <location>", "Specify a file path to save a File-type Send to")
.option("--text", "Specifies to return the text content of a Send")
.on("--help", () => {
writeLn("");
@@ -192,6 +200,10 @@ export class SendProgram extends BaseProgram {
this.serviceContainer.searchService,
this.serviceContainer.encryptService,
this.serviceContainer.apiService,
this.serviceContainer.platformUtilsService,
this.serviceContainer.keyService,
this.serviceContainer.cryptoFunctionService,
this.serviceContainer.sendApiService,
);
const response = await cmd.run(id, options);
this.processResponse(response);
@@ -252,6 +264,10 @@ export class SendProgram extends BaseProgram {
this.serviceContainer.searchService,
this.serviceContainer.encryptService,
this.serviceContainer.apiService,
this.serviceContainer.platformUtilsService,
this.serviceContainer.keyService,
this.serviceContainer.cryptoFunctionService,
this.serviceContainer.sendApiService,
);
const cmd = new SendEditCommand(
this.serviceContainer.sendService,