@@ -15,14 +15,14 @@ module.exports = {
15
15
const usedFuncRefs = _ . uniq (
16
16
_ . flatMap ( aliasStackTemplates , template => {
17
17
const funcRefs = _ . map (
18
- _ . assign ( { } ,
19
- _ . pickBy (
20
- _ . get ( template , 'Resources' , { } ) ,
21
- [ 'Type' , 'AWS::Lambda::Alias' ] ) ) ,
22
- ( value , key ) => {
23
- return _ . replace ( key , / A l i a s $ / , '' ) ;
24
- } ) ;
25
-
18
+ _ . assign ( { } ,
19
+ _ . pickBy (
20
+ _ . get ( template , 'Resources' , { } ) ,
21
+ [ 'Type' , 'AWS::Lambda::Alias' ] ) ) ,
22
+ ( value , key ) => {
23
+ return _ . replace ( key , / A l i a s $ / , '' ) ;
24
+ }
25
+ ) ;
26
26
return funcRefs ;
27
27
} )
28
28
) ;
@@ -143,7 +143,7 @@ module.exports = {
143
143
144
144
let stackTags = { STAGE : this . _stage } ;
145
145
146
- // Merge additional stack tags
146
+ // Merge additional stack tags
147
147
if ( _ . isObject ( this . serverless . service . provider . stackTags ) ) {
148
148
stackTags = _ . extend ( stackTags , this . serverless . service . provider . stackTags ) ;
149
149
}
@@ -161,7 +161,7 @@ module.exports = {
161
161
162
162
this . options . verbose && this . _serverless . cli . log ( `Checking stack policy` ) ;
163
163
164
- // Policy must have at least one statement, otherwise no updates would be possible at all
164
+ // Policy must have at least one statement, otherwise no updates would be possible at all
165
165
if ( this . serverless . service . provider . stackPolicy &&
166
166
this . serverless . service . provider . stackPolicy . length ) {
167
167
params . StackPolicyBody = JSON . stringify ( {
@@ -170,18 +170,18 @@ module.exports = {
170
170
}
171
171
172
172
return this . _provider . request ( 'CloudFormation' ,
173
- 'updateStack' ,
174
- params ,
175
- this . options . stage ,
176
- this . options . region )
177
- . then ( cfData => this . monitorStack ( 'update' , cfData ) )
173
+ 'updateStack' ,
174
+ params ,
175
+ this . options . stage ,
176
+ this . options . region )
177
+ . then ( cfData => this . monitorStack ( 'update' , cfData ) )
178
178
. then ( ( ) => BbPromise . resolve ( [ currentTemplate , aliasStackTemplates , currentAliasStackTemplate ] ) )
179
- . catch ( err => {
180
- if ( err . message === NO_UPDATE_MESSAGE ) {
181
- return BbPromise . resolve ( [ currentTemplate , aliasStackTemplates , currentAliasStackTemplate ] ) ;
182
- }
183
- throw err ;
184
- } ) ;
179
+ . catch ( err => {
180
+ if ( err . message === NO_UPDATE_MESSAGE ) {
181
+ return BbPromise . resolve ( [ currentTemplate , aliasStackTemplates , currentAliasStackTemplate ] ) ;
182
+ }
183
+ throw err ;
184
+ } ) ;
185
185
186
186
} ,
187
187
@@ -192,10 +192,10 @@ module.exports = {
192
192
this . options . verbose && this . _serverless . cli . log ( `Removing CF stack ${ stackName } ` ) ;
193
193
194
194
return this . _provider . request ( 'CloudFormation' ,
195
- 'deleteStack' ,
196
- { StackName : stackName } ,
197
- this . _options . stage ,
198
- this . _options . region )
195
+ 'deleteStack' ,
196
+ { StackName : stackName } ,
197
+ this . _options . stage ,
198
+ this . _options . region )
199
199
. then ( cfData => {
200
200
// monitorStack wants a StackId member
201
201
cfData . StackId = stackName ;
@@ -204,14 +204,14 @@ module.exports = {
204
204
. then ( ( ) => {
205
205
return BbPromise . resolve ( [ currentTemplate , aliasStackTemplates , currentAliasStackTemplate ] ) ;
206
206
} )
207
- . catch ( e => {
208
- if ( _ . includes ( e . message , 'does not exist' ) ) {
209
- const message = `Alias ${ this . _alias } is not deployed.` ;
210
- throw new this . _serverless . classes . Error ( message ) ;
211
- }
207
+ . catch ( e => {
208
+ if ( _ . includes ( e . message , 'does not exist' ) ) {
209
+ const message = `Alias ${ this . _alias } is not deployed.` ;
210
+ throw new this . _serverless . classes . Error ( message ) ;
211
+ }
212
212
213
- throw e ;
214
- } ) ;
213
+ throw e ;
214
+ } ) ;
215
215
216
216
} ,
217
217
0 commit comments