@@ -3,13 +3,13 @@ const path = require('path')
33const pWaitFor = require ( 'p-wait-for' )
44
55// Default filter when scanning for files
6- const defaultFilter = ( filename ) => {
7- if ( filename == null ) return false
8- const n = path . basename ( filename )
6+ const defaultFilter = ( filePath ) => {
7+ if ( filePath == null ) return false
8+ const filename = path . basename ( filePath )
99 switch ( true ) {
10- case n === 'node_modules' :
11- case n . startsWith ( '.' ) && n !== '.well-known' :
12- case n . match ( / ( \/ _ _ M A C O S X | \/ \. ) / ) :
10+ case filename === 'node_modules' :
11+ case filename . startsWith ( '.' ) && filename !== '.well-known' :
12+ case filename . match ( / ( \/ _ _ M A C O S X | \/ \. ) / ) :
1313 return false
1414 default :
1515 return true
@@ -35,20 +35,20 @@ const waitForDiff = async (api, deployId, siteId, timeout) => {
3535 let deploy
3636
3737 const loadDeploy = async ( ) => {
38- const d = await api . getSiteDeploy ( { siteId, deployId } )
38+ const siteDeploy = await api . getSiteDeploy ( { siteId, deployId } )
3939
40- switch ( d . state ) {
40+ switch ( siteDeploy . state ) {
4141 // https://github.com/netlify/bitballoon/blob/master/app/models/deploy.rb#L21-L33
4242 case 'error' : {
4343 const deployError = new Error ( `Deploy ${ deployId } had an error` )
44- deployError . deploy = d
44+ deployError . deploy = siteDeploy
4545 throw deployError
4646 }
4747 case 'prepared' :
4848 case 'uploading' :
4949 case 'uploaded' :
5050 case 'ready' : {
51- deploy = d
51+ deploy = siteDeploy
5252 return true
5353 }
5454 case 'preparing' :
@@ -73,16 +73,16 @@ const waitForDeploy = async (api, deployId, siteId, timeout) => {
7373 let deploy
7474
7575 const loadDeploy = async ( ) => {
76- const d = await api . getSiteDeploy ( { siteId, deployId } )
77- switch ( d . state ) {
76+ const siteDeploy = await api . getSiteDeploy ( { siteId, deployId } )
77+ switch ( siteDeploy . state ) {
7878 // https://github.com/netlify/bitballoon/blob/master/app/models/deploy.rb#L21-L33
7979 case 'error' : {
8080 const deployError = new Error ( `Deploy ${ deployId } had an error` )
81- deployError . deploy = d
81+ deployError . deploy = siteDeploy
8282 throw deployError
8383 }
8484 case 'ready' : {
85- deploy = d
85+ deploy = siteDeploy
8686 return true
8787 }
8888 case 'preparing' :
0 commit comments