2016-10-12 08:44:29 +02:00

46 lines
971 B
JavaScript

'use strict';
class Invoke {
constructor(serverless) {
this.serverless = serverless;
this.commands = {
invoke: {
usage: 'Invoke a deployed function',
lifecycleEvents: [
'invoke',
],
options: {
function: {
usage: 'The function name',
required: true,
shortcut: 'f',
},
stage: {
usage: 'Stage of the service',
shortcut: 's',
},
region: {
usage: 'Region of the service',
shortcut: 'r',
},
path: {
usage: 'Path to JSON file holding input data',
shortcut: 'p',
},
type: {
usage: 'Type of invocation',
shortcut: 't',
},
log: {
usage: 'Trigger logging data output',
shortcut: 'l',
},
},
},
};
}
}
module.exports = Invoke;