1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-12 06:13:38 +00:00

[PM-3326] [CLI] Add minNumber, minSpecial and ambiguous password generation options (#5974)

* feat(cli): add minNumber option and pass to generation service

* feat(cli): add minSpecial option and pass to generation service

* feat(cli): add ambiguous option and pass to generation service

* refactor: extract utils to convert number and string options

* feat(ts): add types to utils and options

* feat: validate result of parsed value in convertNumberOption util
This commit is contained in:
José Pereira
2023-09-04 21:01:16 +01:00
committed by GitHub
parent bf7aa6473e
commit a920d62dfe
3 changed files with 33 additions and 4 deletions

View File

@@ -298,9 +298,12 @@ export class Program {
.option("-p, --passphrase", "Generate a passphrase.")
.option("--length <length>", "Length of the password.")
.option("--words <words>", "Number of words.")
.option("--minNumber <count>", "Minimum number of numeric characters.")
.option("--minSpecial <count>", "Minimum number of special characters.")
.option("--separator <separator>", "Word separator.")
.option("-c, --capitalize", "Title case passphrase.")
.option("--includeNumber", "Passphrase includes number.")
.option("--ambiguous", "Avoid ambiguous characters.")
.on("--help", () => {
writeLn("\n Notes:");
writeLn("");