diff options
| author | Jan Tuomi <jan.tuomi@eficode.com> | 2018-07-13 12:44:25 +0300 |
|---|---|---|
| committer | Jan Tuomi <jan.tuomi@eficode.com> | 2018-07-13 12:44:25 +0300 |
| commit | ea8e59bc8bf7e97b72a89a65889e5da38a6445fa (patch) | |
| tree | abf07df68d9d61a6d5c73b384093679ca0984d79 /cli.js | |
| parent | a69b3b644a9275e43a3832ed9cf3ccfbda336189 (diff) | |
Implement command to list secret keysmaster
Diffstat (limited to 'cli.js')
| -rwxr-xr-x | cli.js | 28 |
1 files changed, 25 insertions, 3 deletions
@@ -279,7 +279,29 @@ vorpal }); vorpal - .command('package add <package>', `Enqueue an NPM package installation on the host.`) + .command('secret list', 'List secret keys.') + .action(async function (args, callback) { + try { + await checkConnection(mongoURL, this); + } catch (err) { + showMongoNotSetError(vorpal); + return callback(); + } + + try { + const secretObjects = await models.secrets.find({}); + secretObjects.forEach(secret => { + this.log(secret.key); + }); + } catch (err) { + this.log(chalk.red(`Failed to list secrets!`)); + this.log(chalk.red(String(err))); + } + callback(); + }); + +vorpal + .command('package add <package>', `${chalk.yellow('(Not implemented)')} Enqueue an NPM package installation on the host.`) .action(async function (args, callback) { try { await checkConnection(mongoURL, this); @@ -307,7 +329,7 @@ vorpal }); vorpal - .command('package remove <package>', `Dequeue an NPM package installation on the host. NOTE: Does not uninstall already installed packages.`) + .command('package remove <package>', `${chalk.yellow('(Not implemented)')} Dequeue an NPM package installation on the host. NOTE: Does not uninstall already installed packages.`) .action(async function (args, callback) { try { await checkConnection(mongoURL, this); @@ -337,7 +359,7 @@ vorpal }); vorpal - .command('package list', `List NPM packages in the installation queue.`) + .command('package list', `${chalk.yellow('(Not implemented)')} List NPM packages in the installation queue.`) .action(async function (args, callback) { try { await checkConnection(mongoURL, this); |
