feature(cloudcmd) add getPassword

This commit is contained in:
coderaiser 2015-10-29 09:40:01 -04:00
parent ed6f8b0ee8
commit 5a36067bab

View file

@ -7,9 +7,10 @@
DIR = __dirname + '/../',
DIR_LIB = DIR + 'lib/',
DIR_SERVER = DIR_LIB + 'server/',
exit = require(DIR_SERVER + 'exit'),
config = require(DIR_SERVER + 'config'),
createPass = require(DIR_SERVER + 'password'),
options,
argv = process.argv,
@ -96,7 +97,7 @@ if (args.version) {
};
if (args.password)
options.password = args.password;
config('password', getPassword(args.password));
if (!args.save)
start(options);
@ -106,6 +107,10 @@ if (args.version) {
});
}
function getPassword(password) {
return createPass(config('algo'), password);
}
function deprecate(was, became) {
var value = args[was];