@@ -21,7 +21,7 @@ function injectRequirements(
2121 requirementsPath ,
2222 packagePath ,
2323 injectionRelativePath ,
24- options
24+ options ,
2525) {
2626 const noDeploy = new Set ( options . noDeploy || [ ] ) ;
2727
@@ -33,31 +33,31 @@ function injectRequirements(
3333 glob . sync ( [ path . join ( requirementsPath , '**' ) ] , {
3434 mark : true ,
3535 dot : true ,
36- } )
36+ } ) ,
3737 )
3838 . map ( ( file ) => [
3939 file ,
4040 path . join (
4141 injectionRelativePath ,
42- path . relative ( requirementsPath , file )
42+ path . relative ( requirementsPath , file ) ,
4343 ) ,
4444 ] )
4545 . filter (
4646 ( [ file , relativeFile ] ) =>
4747 ! file . endsWith ( '/' ) &&
4848 ! relativeFile . match ( / ^ _ _ p y c a c h e _ _ [ \\ / ] / ) &&
49- ! noDeploy . has ( relativeFile . split ( / ( [ - \\ / ] | \. p y $ | \. p y c $ ) / , 1 ) [ 0 ] )
49+ ! noDeploy . has ( relativeFile . split ( / ( [ - \\ / ] | \. p y $ | \. p y c $ ) / , 1 ) [ 0 ] ) ,
5050 )
5151 . map ( ( [ file , relativeFile ] ) =>
52- Promise . all ( [ file , relativeFile , fse . statAsync ( file ) ] )
52+ Promise . all ( [ file , relativeFile , fse . statAsync ( file ) ] ) ,
5353 )
5454 . mapSeries ( ( [ file , relativeFile , fileStat ] ) =>
5555 zipFile ( zip , relativeFile , fse . readFileAsync ( file ) , {
5656 unixPermissions : fileStat . mode ,
5757 createFolders : false ,
58- } )
58+ } ) ,
5959 )
60- . then ( ( ) => writeZip ( zip , packagePath ) )
60+ . then ( ( ) => writeZip ( zip , packagePath ) ) ,
6161 ) ;
6262}
6363
@@ -79,17 +79,17 @@ function moveModuleUp(source, target, module) {
7979 ( file ) =>
8080 file . startsWith ( module + '/' ) ||
8181 file . startsWith ( 'serverless_sdk/' ) ||
82- file . match ( / ^ s _ .* \. p y / ) !== null
83- )
82+ file . match ( / ^ s _ .* \. p y / ) !== null ,
83+ ) ,
8484 )
8585 . map ( ( srcZipObj ) =>
8686 zipFile (
8787 targetZip ,
8888 srcZipObj . name . startsWith ( module + '/' )
8989 ? srcZipObj . name . replace ( module + '/' , '' )
9090 : srcZipObj . name ,
91- srcZipObj . async ( 'nodebuffer' )
92- )
91+ srcZipObj . async ( 'nodebuffer' ) ,
92+ ) ,
9393 )
9494 . then ( ( ) => writeZip ( targetZip , target ) ) ;
9595}
@@ -123,8 +123,8 @@ async function injectAllRequirements(funcArtifact) {
123123 await BbPromise . resolve ( this . targetFuncs )
124124 . filter ( ( func ) =>
125125 ( func . runtime || this . serverless . service . provider . runtime ) . match (
126- / ^ p y t h o n .* /
127- )
126+ / ^ p y t h o n .* / ,
127+ ) ,
128128 )
129129 . map ( ( func ) => {
130130 if ( ! get ( func , 'module' ) ) {
@@ -139,11 +139,11 @@ async function injectAllRequirements(funcArtifact) {
139139 : funcArtifact ;
140140 const newArtifact = path . join (
141141 '.serverless' ,
142- `${ func . module } -${ func . name } .zip`
142+ `${ func . module } -${ func . name } .zip` ,
143143 ) ;
144144 func . package . artifact = newArtifact ;
145145 return moveModuleUp ( artifact , newArtifact , func . module ) . then (
146- ( ) => func
146+ ( ) => func ,
147147 ) ;
148148 } else {
149149 return func ;
@@ -156,15 +156,15 @@ async function injectAllRequirements(funcArtifact) {
156156 path . join ( '.serverless' , func . module , 'requirements' ) ,
157157 func . package . artifact ,
158158 injectionRelativePath ,
159- this . options
159+ this . options ,
160160 ) ;
161161 } ) ;
162162 } else if ( ! this . options . zip ) {
163163 await injectRequirements (
164164 path . join ( '.serverless' , 'requirements' ) ,
165165 this . serverless . service . package . artifact || funcArtifact ,
166166 injectionRelativePath ,
167- this . options
167+ this . options ,
168168 ) ;
169169 }
170170 } finally {
0 commit comments