File tree 1 file changed +7
-17
lines changed
1 file changed +7
-17
lines changed Original file line number Diff line number Diff line change @@ -54,17 +54,6 @@ class ServerlessWebpack {
54
54
lifecycleEvents : [
55
55
'invoke' ,
56
56
] ,
57
- options : {
58
- function : {
59
- usage : 'Name of the function' ,
60
- shortcut : 'f' ,
61
- required : true ,
62
- } ,
63
- path : {
64
- usage : 'Path to JSON file holding input data' ,
65
- shortcut : 'p' ,
66
- } ,
67
- } ,
68
57
} ,
69
58
watch : {
70
59
usage : 'Run a function from the webpack output bundle every time the source is changed' ,
@@ -108,6 +97,10 @@ class ServerlessWebpack {
108
97
'after:deploy:createDeploymentArtifacts' : ( ) => BbPromise . bind ( this )
109
98
. then ( this . cleanup ) ,
110
99
100
+ 'before:invoke:local:invoke' : ( ) => BbPromise . bind ( this )
101
+ . then ( this . validate )
102
+ . then ( this . compile ) ,
103
+
111
104
'webpack:validate' : ( ) => BbPromise . bind ( this )
112
105
. then ( this . validate ) ,
113
106
@@ -116,10 +109,7 @@ class ServerlessWebpack {
116
109
. then ( this . packExternalModules ) ,
117
110
118
111
'webpack:invoke:invoke' : ( ) => BbPromise . bind ( this )
119
- . then ( this . validate )
120
- . then ( this . compile )
121
- . then ( this . run )
122
- . then ( out => this . serverless . cli . consoleLog ( out ) ) ,
112
+ . then ( ( ) => BbPromise . reject ( new this . serverless . classes . Error ( 'Use "serverless invoke local" instead.' ) ) ) ,
123
113
124
114
'webpack:watch:watch' : ( ) => BbPromise . bind ( this )
125
115
. then ( this . validate )
@@ -132,11 +122,11 @@ class ServerlessWebpack {
132
122
'before:offline:start' : ( ) => BbPromise . bind ( this )
133
123
. then ( this . validate )
134
124
. then ( this . wpwatch ) ,
135
-
125
+
136
126
'before:offline:start:init' : ( ) => BbPromise . bind ( this )
137
127
. then ( this . validate )
138
128
. then ( this . wpwatch ) ,
139
-
129
+
140
130
} ;
141
131
}
142
132
}
You can’t perform that action at this time.
0 commit comments