@@ -3,12 +3,11 @@ const fs = require('fs'),
33 archiver = require ( 'archiver' ) ,
44 logger = require ( "./logger" ) ;
55
6- const archiveSpecs = ( runSettings , filePath ) => {
6+ const archiveSpecs = ( bsConfig , filePath ) => {
77 return new Promise ( function ( resolve , reject ) {
88 var output = fs . createWriteStream ( filePath ) ;
99
10- var cypressFolderPath = runSettings . cypress_proj_dir
11- var packageJsonPath = runSettings . package_json_path
10+ var cypressFolderPath = bsConfig . run_settings . cypress_proj_dir
1211
1312 var archive = archiver ( 'zip' , {
1413 zlib : { level : 9 } // Sets the compression level.
@@ -36,11 +35,13 @@ const archiveSpecs = (runSettings, filePath) => {
3635
3736 archive . pipe ( output ) ;
3837
38+ var packageJSON = JSON . stringify ( { devDependencies : bsConfig . npm_dependencies } , null , 4 ) ;
39+
3940 let allowedFileTypes = [ 'js' , 'json' , 'txt' , 'ts' ]
4041 allowedFileTypes . forEach ( fileType => {
4142 archive
4243 . glob ( `**/*.${ fileType } ` , { cwd : cypressFolderPath , matchBase : true , ignore : 'node_modules/**' } )
43- . append ( packageJsonPath , { name : 'package.json' } ) ;
44+ . append ( packageJSON , { name : 'package.json' } ) ;
4445 } ) ;
4546
4647 archive . finalize ( ) ;
0 commit comments