mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-09 09:51:02 +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',
|
type: cmdOptions.passphrase ? 'passphrase' : 'password',
|
||||||
wordSeparator: cmdOptions.separator == null ? '-' : cmdOptions.separator,
|
wordSeparator: cmdOptions.separator == null ? '-' : cmdOptions.separator,
|
||||||
numWords: cmdOptions.words || 3,
|
numWords: cmdOptions.words || 3,
|
||||||
|
capitalize: cmdOptions.capitalize || false,
|
||||||
|
includeNumber: cmdOptions.includeNumber || false,
|
||||||
};
|
};
|
||||||
if (!options.uppercase && !options.lowercase && !options.special && !options.number) {
|
if (!options.uppercase && !options.lowercase && !options.special && !options.number) {
|
||||||
options.lowercase = true;
|
options.lowercase = true;
|
||||||
|
@ -246,6 +246,8 @@ export class Program extends BaseProgram {
|
|||||||
.option('--length <length>', 'Length of the password.')
|
.option('--length <length>', 'Length of the password.')
|
||||||
.option('--words <words>', 'Number of words.')
|
.option('--words <words>', 'Number of words.')
|
||||||
.option('--separator <separator>', 'Word separator.')
|
.option('--separator <separator>', 'Word separator.')
|
||||||
|
.option('-c, --capitalize', 'Title case passphrase.')
|
||||||
|
.option('--includeNumber', 'Passphrase includes number.')
|
||||||
.on('--help', () => {
|
.on('--help', () => {
|
||||||
writeLn('\n Notes:');
|
writeLn('\n Notes:');
|
||||||
writeLn('');
|
writeLn('');
|
||||||
|
Loading…
Reference in New Issue
Block a user