diff --git a/app.js b/app.js index 478e55ee9afdc076031d3c3636ea7ffc45a474ce..624429d0a0860b432d45e980f1de6b7e05531406 100644 --- a/app.js +++ b/app.js @@ -35,16 +35,6 @@ app.use(bodyParser.json()); //TODO add spinner for telling user to wait until initialization is done - //TODO clone the git repos: function initialize here (for better understanding) or in gitRepos.js defined? - //Clone the git repos initially for performance. - // function initialize(downloadFiles){ - // return initGitRepos.initBackend(downloadFiles).then(function(downloadFiles){ - // return initGitRepos.initBackendPlugins(downloadFiles).then(function(downloadFiles){ - // return initGitRepos.initFrontend(downloadFiles) - // }) - // }) - // }; - //initGitRepos.initialize(downloadFiles); //routes @@ -112,7 +102,7 @@ app.use(bodyParser.json()); function frontendAll() { return frontendFunctions.frontendClean(fileName).then(function(){ return frontendFunctions.frontendPull(fileName).then(function(){ - return frontendFunctions.frontendInstallAddons(checkedFiles, downloadFiles).then(function(){ + return frontendFunctions.frontendInstallAddons(fileName, checkedFiles, downloadFiles).then(function(){ return frontendFunctions.frontendBuild(fileName) }) }) @@ -138,13 +128,11 @@ zip.file("README.txt", "text for README"); let finishedArray=[]; function streamFilesToZip(){ - console.log('in streamFilesToZip'); - + return new Promise((resolve,reject)=> { Promise.all(promiseArray).then(files => { - console.log('in Promise.all, files:', files); - + files.forEach(file => { if (file.zipFileName === 'backend.war'){ @@ -164,8 +152,6 @@ function streamFilesToZip(){ function addBackendToZip(data){ return new Promise(function(resolve,reject){ zip.file(file.zipFileName, data); - console.log('zip in addBackendToZip:', zip); - console.log('finishedArray in backend:', finishedArray); resolve(); }) } @@ -195,7 +181,6 @@ function streamFilesToZip(){ } }).on('finish', function(){ - console.log('zip in frontend:', zip); finishedArray.push('frontend finished'); if(finishedArray.length === promiseArray.length){ resolve(zip);