mirror of
https://github.com/bitwarden/browser
synced 2025-12-18 09:13:33 +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:
@@ -11,7 +11,10 @@ export class CliPlatformUtilsService implements PlatformUtilsService {
|
||||
|
||||
private deviceCache: DeviceType = null;
|
||||
|
||||
constructor(clientType: ClientType, private packageJson: any) {
|
||||
constructor(
|
||||
clientType: ClientType,
|
||||
private packageJson: any,
|
||||
) {
|
||||
this.clientType = clientType;
|
||||
}
|
||||
|
||||
@@ -107,7 +110,7 @@ export class CliPlatformUtilsService implements PlatformUtilsService {
|
||||
type: "error" | "success" | "warning" | "info",
|
||||
title: string,
|
||||
text: string | string[],
|
||||
options?: any
|
||||
options?: any,
|
||||
): void {
|
||||
throw new Error("Not implemented.");
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ export class I18nService extends BaseI18nService {
|
||||
super(systemLanguage, localesDirectory, (formattedLocale: string) => {
|
||||
const filePath = path.join(
|
||||
__dirname,
|
||||
this.localesDirectory + "/" + formattedLocale + "/messages.json"
|
||||
this.localesDirectory + "/" + formattedLocale + "/messages.json",
|
||||
);
|
||||
const localesJson = fs.readFileSync(filePath, "utf8");
|
||||
const locales = JSON.parse(localesJson.replace(/^\uFEFF/, "")); // strip the BOM
|
||||
|
||||
@@ -36,7 +36,7 @@ export class LowdbStorageService implements AbstractStorageService {
|
||||
defaults?: any,
|
||||
private dir?: string,
|
||||
private allowCache = false,
|
||||
private requireLock = false
|
||||
private requireLock = false,
|
||||
) {
|
||||
this.defaults = defaults;
|
||||
this.updates$ = this.updatesSubject.asObservable();
|
||||
@@ -59,7 +59,7 @@ export class LowdbStorageService implements AbstractStorageService {
|
||||
this.dataFilePath = path.join(this.dir, "data.json");
|
||||
if (!fs.existsSync(this.dataFilePath)) {
|
||||
this.logService.warning(
|
||||
`Could not find data file, "${this.dataFilePath}"; creating it instead.`
|
||||
`Could not find data file, "${this.dataFilePath}"; creating it instead.`,
|
||||
);
|
||||
fs.writeFileSync(this.dataFilePath, "", { mode: 0o600 });
|
||||
fs.chmodSync(this.dataFilePath, 0o600);
|
||||
@@ -78,14 +78,14 @@ export class LowdbStorageService implements AbstractStorageService {
|
||||
} catch (e) {
|
||||
if (e instanceof SyntaxError) {
|
||||
this.logService.warning(
|
||||
`Error creating lowdb storage adapter, "${e.message}"; emptying data file.`
|
||||
`Error creating lowdb storage adapter, "${e.message}"; emptying data file.`,
|
||||
);
|
||||
if (fs.existsSync(this.dataFilePath)) {
|
||||
const backupPath = this.dataFilePath + ".bak";
|
||||
this.logService.warning(`Writing backup of data file to ${backupPath}`);
|
||||
await fs.copyFile(this.dataFilePath, backupPath, () => {
|
||||
this.logService.warning(
|
||||
`Error while creating data file backup, "${e.message}". No backup may have been created.`
|
||||
`Error while creating data file backup, "${e.message}". No backup may have been created.`,
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ export class NodeApiService extends ApiService {
|
||||
environmentService: EnvironmentService,
|
||||
appIdService: AppIdService,
|
||||
logoutCallback: (expired: boolean) => Promise<void>,
|
||||
customUserAgent: string = null
|
||||
customUserAgent: string = null,
|
||||
) {
|
||||
super(
|
||||
tokenService,
|
||||
@@ -29,7 +29,7 @@ export class NodeApiService extends ApiService {
|
||||
environmentService,
|
||||
appIdService,
|
||||
logoutCallback,
|
||||
customUserAgent
|
||||
customUserAgent,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ export class NodeEnvSecureStorageService implements AbstractStorageService {
|
||||
constructor(
|
||||
private storageService: AbstractStorageService,
|
||||
private logService: LogService,
|
||||
private cryptoService: () => CryptoService
|
||||
private cryptoService: () => CryptoService,
|
||||
) {}
|
||||
|
||||
get valuesRequireDeserialization(): boolean {
|
||||
@@ -20,7 +20,7 @@ export class NodeEnvSecureStorageService implements AbstractStorageService {
|
||||
|
||||
get updates$() {
|
||||
return throwError(
|
||||
() => new Error("Secure storage implementations cannot have their updates subscribed to.")
|
||||
() => new Error("Secure storage implementations cannot have their updates subscribed to."),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ export class NodeEnvSecureStorageService implements AbstractStorageService {
|
||||
}
|
||||
const encValue = await this.cryptoService().encryptToBytes(
|
||||
Utils.fromB64ToArray(plainValue),
|
||||
sessionKey
|
||||
sessionKey,
|
||||
);
|
||||
if (encValue == null) {
|
||||
throw new Error("Value didn't encrypt.");
|
||||
|
||||
Reference in New Issue
Block a user