@@ -17,54 +17,54 @@ class ScalewayDeploy {
1717 this . provider = this . serverless . getProvider ( 'scaleway' ) ;
1818
1919 Object . assign (
20- this ,
21- validate ,
22- setUpDeployment ,
23- createNamespace ,
24- createFunctions ,
25- createContainers ,
26- pushContainers ,
27- uploadCode ,
28- deployFunctions ,
29- deployContainers ,
30- namespaceUtils ,
20+ this ,
21+ validate ,
22+ setUpDeployment ,
23+ createNamespace ,
24+ createFunctions ,
25+ createContainers ,
26+ pushContainers ,
27+ uploadCode ,
28+ deployFunctions ,
29+ deployContainers ,
30+ namespaceUtils ,
3131 ) ;
3232
3333 function chainContainers ( ) {
34- if ( this . provider . serverless . service . custom &&
35- this . provider . serverless . service . custom . containers &&
36- Object . keys ( this . provider . serverless . service . custom . containers ) . length !== 0 ) {
34+ if ( this . provider . serverless . service . custom
35+ && this . provider . serverless . service . custom . containers
36+ && Object . keys ( this . provider . serverless . service . custom . containers ) . length !== 0 ) {
3737 return this . createContainers ( )
38- . then ( this . pushContainers )
39- . then ( this . deployContainers )
38+ . then ( this . pushContainers )
39+ . then ( this . deployContainers ) ;
4040 }
41- } ;
41+ }
4242
4343 function chainFunctions ( ) {
44- if ( this . provider . serverless . service . functions &&
45- Object . keys ( this . provider . serverless . service . functions ) . length !== 0 ) {
44+ if ( this . provider . serverless . service . functions
45+ && Object . keys ( this . provider . serverless . service . functions ) . length !== 0 ) {
4646 return this . createFunctions ( )
47- . then ( this . uploadCode )
48- . then ( this . deployFunctions )
47+ . then ( this . uploadCode )
48+ . then ( this . deployFunctions ) ;
4949 }
50- } ;
50+ }
5151
5252 this . hooks = {
5353 // Validate serverless.yml, set up default values, configure deployment...
5454 'before:deploy:deploy' : ( ) => BbPromise . bind ( this )
5555 . then ( this . provider . initialize ( this . serverless , this . options ) )
56- . then ( this . validate )
57- . then ( this . setUpDeployment ) ,
56+ . then ( this . setUpDeployment )
57+ . then ( this . validate ) ,
5858 // Every tasks related to functions deployment:
5959 // - Create a namespace if it does not exist
6060 // - Create each functions in API if it does not exist
6161 // - Zip code - zip each function
6262 // - Get Presigned URL and Push code for each function to S3
6363 // - Deploy each function / container
6464 'deploy:deploy' : ( ) => BbPromise . bind ( this )
65- . then ( this . createNamespace )
66- . then ( chainContainers )
67- . then ( chainFunctions )
65+ . then ( this . createNamespace )
66+ . then ( chainContainers )
67+ . then ( chainFunctions ) ,
6868 } ;
6969 }
7070}
0 commit comments