mirror of
https://github.com/bitwarden/browser
synced 2025-12-19 09:43:23 +00:00
[deps] Autofill: Update prettier to v3 (#7014)
* [deps] Autofill: Update prettier to v3 * prettier formatting updates --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Jonathan Prusik <jprusik@classynemesis.com>
This commit is contained in:
@@ -18,7 +18,7 @@ export class SendCreateCommand {
|
||||
private sendService: SendService,
|
||||
private stateService: StateService,
|
||||
private environmentService: EnvironmentService,
|
||||
private sendApiService: SendApiService
|
||||
private sendApiService: SendApiService,
|
||||
) {}
|
||||
|
||||
async run(requestJson: any, cmdOptions: Record<string, any>) {
|
||||
@@ -78,7 +78,7 @@ export class SendCreateCommand {
|
||||
case SendType.File:
|
||||
if (process.env.BW_SERVE === "true") {
|
||||
return Response.error(
|
||||
"Creating a file-based Send is unsupported through the `serve` command at this time."
|
||||
"Creating a file-based Send is unsupported through the `serve` command at this time.",
|
||||
);
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@ export class SendCreateCommand {
|
||||
|
||||
if (filePath == null) {
|
||||
return Response.badRequest(
|
||||
"Must specify a file to Send either with the --file option or in the request JSON."
|
||||
"Must specify a file to Send either with the --file option or in the request JSON.",
|
||||
);
|
||||
}
|
||||
|
||||
@@ -97,7 +97,7 @@ export class SendCreateCommand {
|
||||
case SendType.Text:
|
||||
if (text == null) {
|
||||
return Response.badRequest(
|
||||
"Must specify text content to Send either with the --text option or in the request JSON."
|
||||
"Must specify text content to Send either with the --text option or in the request JSON.",
|
||||
);
|
||||
}
|
||||
req.text = new SendTextResponse();
|
||||
@@ -106,7 +106,7 @@ export class SendCreateCommand {
|
||||
break;
|
||||
default:
|
||||
return Response.badRequest(
|
||||
"Unknown Send type " + SendType[req.type] + ". Valid types are: file, text"
|
||||
"Unknown Send type " + SendType[req.type] + ". Valid types are: file, text",
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,10 @@ import { SendService } from "@bitwarden/common/tools/send/services/send.service.
|
||||
import { Response } from "../../../models/response";
|
||||
|
||||
export class SendDeleteCommand {
|
||||
constructor(private sendService: SendService, private sendApiService: SendApiService) {}
|
||||
constructor(
|
||||
private sendService: SendService,
|
||||
private sendApiService: SendApiService,
|
||||
) {}
|
||||
|
||||
async run(id: string) {
|
||||
const send = await this.sendService.getFromState(id);
|
||||
|
||||
@@ -14,7 +14,7 @@ export class SendEditCommand {
|
||||
private sendService: SendService,
|
||||
private stateService: StateService,
|
||||
private getCommand: SendGetCommand,
|
||||
private sendApiService: SendApiService
|
||||
private sendApiService: SendApiService,
|
||||
) {}
|
||||
|
||||
async run(requestJson: string, cmdOptions: Record<string, any>): Promise<Response> {
|
||||
|
||||
@@ -16,7 +16,7 @@ export class SendGetCommand extends DownloadCommand {
|
||||
private sendService: SendService,
|
||||
private environmentService: EnvironmentService,
|
||||
private searchService: SearchService,
|
||||
cryptoService: CryptoService
|
||||
cryptoService: CryptoService,
|
||||
) {
|
||||
super(cryptoService);
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ export class SendListCommand {
|
||||
constructor(
|
||||
private sendService: SendService,
|
||||
private environmentService: EnvironmentService,
|
||||
private searchService: SearchService
|
||||
private searchService: SearchService,
|
||||
) {}
|
||||
|
||||
async run(cmdOptions: Record<string, any>): Promise<Response> {
|
||||
|
||||
@@ -31,7 +31,7 @@ export class SendReceiveCommand extends DownloadCommand {
|
||||
private cryptoFunctionService: CryptoFunctionService,
|
||||
private platformUtilsService: PlatformUtilsService,
|
||||
private environmentService: EnvironmentService,
|
||||
private sendApiService: SendApiService
|
||||
private sendApiService: SendApiService,
|
||||
) {
|
||||
super(cryptoService);
|
||||
}
|
||||
@@ -89,13 +89,13 @@ export class SendReceiveCommand extends DownloadCommand {
|
||||
const downloadData = await this.sendApiService.getSendFileDownloadData(
|
||||
response,
|
||||
this.sendAccessRequest,
|
||||
apiUrl
|
||||
apiUrl,
|
||||
);
|
||||
return await this.saveAttachmentToFile(
|
||||
downloadData.url,
|
||||
this.decKey,
|
||||
response?.file?.fileName,
|
||||
options.output
|
||||
options.output,
|
||||
);
|
||||
}
|
||||
default:
|
||||
@@ -126,7 +126,7 @@ export class SendReceiveCommand extends DownloadCommand {
|
||||
password,
|
||||
keyArray,
|
||||
"sha256",
|
||||
100000
|
||||
100000,
|
||||
);
|
||||
return Utils.fromBufferToB64(passwordHash);
|
||||
}
|
||||
@@ -134,13 +134,13 @@ export class SendReceiveCommand extends DownloadCommand {
|
||||
private async sendRequest(
|
||||
url: string,
|
||||
id: string,
|
||||
key: Uint8Array
|
||||
key: Uint8Array,
|
||||
): Promise<Response | SendAccessView> {
|
||||
try {
|
||||
const sendResponse = await this.sendApiService.postSendAccess(
|
||||
id,
|
||||
this.sendAccessRequest,
|
||||
url
|
||||
url,
|
||||
);
|
||||
|
||||
const sendAccess = new SendAccess(sendResponse);
|
||||
|
||||
@@ -5,7 +5,10 @@ import { Response } from "../../../models/response";
|
||||
import { SendResponse } from "../models/send.response";
|
||||
|
||||
export class SendRemovePasswordCommand {
|
||||
constructor(private sendService: SendService, private sendApiService: SendApiService) {}
|
||||
constructor(
|
||||
private sendService: SendService,
|
||||
private sendApiService: SendApiService,
|
||||
) {}
|
||||
|
||||
async run(id: string) {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user