diff options
| -rw-r--r-- | README.md | 2 | ||||
| -rwxr-xr-x | cli.js | 28 | ||||
| -rw-r--r-- | package.json | 2 |
3 files changed, 27 insertions, 5 deletions
@@ -45,7 +45,7 @@ Create a new endpoint with `create <name>`. Your endpoint is now live at http:// Use `upload <file> <endpoint>` to upload a file from your current working directory to an endpoint. Below is an example of such a file. ``` -module.exports = function (req, res) { +module.exports = function (req, res, secrets) { res.type('text/html'); res.send(<h1>Hello world!</h1>'); }; @@ -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); diff --git a/package.json b/package.json index 0c9d4eb..f092d13 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "faaslift", - "version": "1.0.8", + "version": "1.0.9", "description": "", "main": "index.js", "scripts": { |
