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