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:
parent
07851bea53
commit
6ffc295be9
@ -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;
|
||||
|
@ -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('');
|
||||
|
Loading…
Reference in New Issue
Block a user