whaler
Version:
Define and run multi-container applications with Docker
27 lines (20 loc) • 659 B
JavaScript
;
module.exports = exports;
module.exports.__cmd = require('./cmd');
/**
* @param whaler
*/
async function exports (whaler) {
whaler.on('vars', async ctx => {
const { default: vars } = await whaler.fetch('vars');
ctx.result = await vars.all();
});
whaler.on('vars:set', async ctx => {
const { default: vars } = await whaler.fetch('vars');
ctx.result = await vars.set(ctx.options['name'], ctx.options['value']);
});
whaler.on('vars:unset', async ctx => {
const { default: vars } = await whaler.fetch('vars');
ctx.result = await vars.unset(ctx.options['name']);
});
}