@@ -110,23 +110,13 @@ type Hooks = {
110
110
[ key : string ] : ( ) => Promise < void > ;
111
111
} ;
112
112
113
- type Commands = {
114
- [ key : string ] :
115
- | Commands
116
- | {
117
- lifecycleEvents ?: string [ ] ;
118
- type ?: string ;
119
- } ;
120
- } ;
121
-
122
113
class ServerlessMake {
123
114
log : Log ;
124
115
125
116
serverless : Serverless ;
126
117
serverlessConfig : ServerlessConfig ;
127
118
pluginConfig : PluginConfig ;
128
119
129
- commands : Commands ;
130
120
hooks ?: Hooks ;
131
121
132
122
constructor ( serverless : Serverless , protected options : Options ) {
@@ -139,15 +129,6 @@ class ServerlessMake {
139
129
140
130
this . log = new Log ( options ) ;
141
131
142
- this . commands = {
143
- [ PLUGIN_NAME ] : {
144
- made : {
145
- lifecycleEvents : [ this . target || "_PHONY" ] ,
146
- type : "entrypoint" ,
147
- } ,
148
- } ,
149
- } ;
150
-
151
132
this . hooks = this . setupHooks ( ) ;
152
133
}
153
134
@@ -166,9 +147,6 @@ class ServerlessMake {
166
147
setupHooks = ( ) => {
167
148
const hooks : Hooks = {
168
149
initialize : async ( ) => { } ,
169
- [ `${ PLUGIN_NAME } :made:${ this . target || "_PHONY" } ` ] : async ( ) => {
170
- this . log . verbose ( `!!! ${ PLUGIN_NAME } :made:${ this . target || "_PHONY" } ` ) ;
171
- } ,
172
150
"before:offline:start" : async ( ) => {
173
151
this . log . verbose ( "before:offline:start" ) ;
174
152
let errored = false ;
@@ -207,7 +185,7 @@ class ServerlessMake {
207
185
const pluginHooks = this . pluginConfig . hooks || { } ;
208
186
209
187
Object . entries ( pluginHooks ) . forEach ( ( [ hook , target ] ) => {
210
- if ( hooks [ hook ] && hook !== ` ${ PLUGIN_NAME } :made` ) {
188
+ if ( hooks [ hook ] ) {
211
189
this . log . warning (
212
190
`Unable to override registered internal hook "${ hook } "!`
213
191
) ;
@@ -274,15 +252,6 @@ class ServerlessMake {
274
252
}
275
253
} ) ;
276
254
}
277
-
278
- const spawn = `${ PLUGIN_NAME } :made` ;
279
- try {
280
- await this . serverless . pluginManager . spawn ( `${ PLUGIN_NAME } :made` ) ;
281
- } catch ( e ) {
282
- if ( e instanceof Error ) {
283
- this . log . warning ( `Unable to spawn ${ spawn } ` ) ;
284
- }
285
- }
286
255
} ;
287
256
}
288
257
0 commit comments