1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-12-23 16:38:45 +01:00

Implemented capitalize, and includeNumber (#369)

* Implemented capitalize, and includeNumber - generate passphrase.

Co-authored-by: davidrenzella <david.renzella@gmail.com>

* Capitalize shorthand flag

* Update package.json

* Remove accidental space

Co-authored-by: davidrenzella <david.renzella@gmail.com>
Co-authored-by: govjmal <govjmal@gmail.com>
This commit is contained in:
Luckymee 2021-09-30 01:09:32 +10:00 committed by GitHub
parent 07851bea53
commit 6ffc295be9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View File

@ -18,6 +18,8 @@ export class GenerateCommand {
type: cmdOptions.passphrase ? 'passphrase' : 'password',
wordSeparator: cmdOptions.separator == null ? '-' : cmdOptions.separator,
numWords: cmdOptions.words || 3,
capitalize: cmdOptions.capitalize || false,
includeNumber: cmdOptions.includeNumber || false,
};
if (!options.uppercase && !options.lowercase && !options.special && !options.number) {
options.lowercase = true;

View File

@ -246,6 +246,8 @@ export class Program extends BaseProgram {
.option('--length <length>', 'Length of the password.')
.option('--words <words>', 'Number of words.')
.option('--separator <separator>', 'Word separator.')
.option('-c, --capitalize', 'Title case passphrase.')
.option('--includeNumber', 'Passphrase includes number.')
.on('--help', () => {
writeLn('\n Notes:');
writeLn('');