mirror of
https://github.com/bitwarden/browser
synced 2025-12-14 15:23:33 +00:00
Remove uses of rxjs in CLI (#4028)
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import { firstValueFrom, map } from "rxjs";
|
||||
import * as zxcvbn from "zxcvbn";
|
||||
|
||||
import { CryptoService } from "../abstractions/crypto.service";
|
||||
@@ -11,7 +10,6 @@ import { EncString } from "../models/domain/enc-string";
|
||||
import { GeneratedPasswordHistory } from "../models/domain/generated-password-history";
|
||||
import { PasswordGeneratorOptions } from "../models/domain/password-generator-options";
|
||||
import { PasswordGeneratorPolicyOptions } from "../models/domain/password-generator-policy-options";
|
||||
import { Policy } from "../models/domain/policy";
|
||||
|
||||
const DefaultOptions: PasswordGeneratorOptions = {
|
||||
length: 14,
|
||||
@@ -257,14 +255,7 @@ export class PasswordGenerationService implements PasswordGenerationServiceAbstr
|
||||
}
|
||||
|
||||
async getPasswordGeneratorPolicyOptions(): Promise<PasswordGeneratorPolicyOptions> {
|
||||
const policies: Policy[] =
|
||||
this.policyService == null
|
||||
? null
|
||||
: await firstValueFrom(
|
||||
this.policyService.policies$.pipe(
|
||||
map((p) => p.filter((policy) => policy.type === PolicyType.PasswordGenerator))
|
||||
)
|
||||
);
|
||||
const policies = await this.policyService?.getAll(PolicyType.PasswordGenerator);
|
||||
let enforcedOptions: PasswordGeneratorPolicyOptions = null;
|
||||
|
||||
if (policies == null || policies.length === 0) {
|
||||
|
||||
Reference in New Issue
Block a user