@@ -70,44 +70,34 @@ exports.loadJsFile = (cypress_config_filepath, bstack_node_modules_path) => {
70
70
load_command = `set NODE_PATH=${ bstack_node_modules_path } && node "${ require_module_helper_path } " "${ cypress_config_filepath } "`
71
71
}
72
72
logger . debug ( `Running: ${ load_command } ` )
73
- console . log ( `Running: ${ load_command } ` )
74
73
cp . execSync ( load_command )
75
- console . log ( `Loaded Cypress config file: ${ config . configJsonFileName } ` )
76
- console . log ( 'Content of config file:' , fs . readFileSync ( config . configJsonFileName , 'utf8' ) )
77
74
const fileContent = fs . readFileSync ( config . configJsonFileName ) . toString ( ) ;
78
- console . log ( 'Content of config file2:' , fileContent ) ;
79
75
const cypress_config = JSON . parse ( fileContent ) ;
80
76
if ( fs . existsSync ( config . configJsonFileName ) ) {
81
77
fs . unlinkSync ( config . configJsonFileName )
82
78
}
83
- console . log ( 'Loaded Cypress config:' , cypress_config )
84
79
return cypress_config
85
80
}
86
81
87
82
exports . readCypressConfigFile = ( bsConfig ) => {
88
- console . log ( 'Reading Cypress config file:' , JSON . stringify ( bsConfig ) ) ;
89
83
const cypress_config_filepath = path . resolve ( bsConfig . run_settings . cypressConfigFilePath )
90
84
try {
91
85
const cypress_config_filename = bsConfig . run_settings . cypress_config_filename
92
86
const bstack_node_modules_path = path . join ( path . resolve ( config . packageDirName ) , 'node_modules' )
93
87
const conf_lang = this . detectLanguage ( cypress_config_filename )
94
88
95
89
logger . debug ( `cypress config path: ${ cypress_config_filepath } ` ) ;
96
- console . log ( `cypress config path: ${ cypress_config_filepath } ` ) ;
97
90
98
91
if ( conf_lang == 'js' || conf_lang == 'cjs' ) {
99
- console . log ( 'Detected config language:' , conf_lang )
100
92
return this . loadJsFile ( cypress_config_filepath , bstack_node_modules_path )
101
93
} else if ( conf_lang === 'ts' ) {
102
- console . log ( 'Detected config language:' , conf_lang )
103
94
const compiled_cypress_config_filepath = this . convertTsConfig ( bsConfig , cypress_config_filepath , bstack_node_modules_path )
104
95
return this . loadJsFile ( compiled_cypress_config_filepath , bstack_node_modules_path )
105
96
}
106
97
} catch ( error ) {
107
98
const errorMessage = `Error while reading cypress config: ${ error . message } `
108
99
const errorCode = 'cypress_config_file_read_failed'
109
100
logger . error ( errorMessage )
110
- console . log ( "error:" , errorMessage )
111
101
utils . sendUsageReport (
112
102
bsConfig ,
113
103
null ,
@@ -123,6 +113,5 @@ exports.readCypressConfigFile = (bsConfig) => {
123
113
if ( fs . existsSync ( complied_js_dir ) ) {
124
114
fs . rmdirSync ( complied_js_dir , { recursive : true } )
125
115
}
126
- console . log ( 'Cleaned up compiled JS directory:' , complied_js_dir )
127
116
}
128
117
}
0 commit comments