forked from serverless/serverless
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinvoke.js
45 lines (42 loc) · 973 Bytes
/
invoke.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
'use strict';
class Invoke {
constructor(serverless) {
this.serverless = serverless;
this.commands = {
invoke: {
usage: 'Invokes 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;