@@ -30,17 +30,38 @@ function createConfig(isDev = false, buildConfig = {}) {
3030 const params = new URLSearchParams ( ) ;
3131
3232 // Add OS information
33+ console . log ( '[CONFIG] Adding OS parameter:' , process . platform ) ;
3334 params . append ( 'os' , process . platform ) ;
35+
36+ // Add architecture information (ensure it's not undefined)
37+ const arch = process . arch || 'unknown' ;
38+ console . log ( '[CONFIG] Adding ARCH parameter:' , arch ) ;
39+ params . append ( 'arch' , arch ) ;
40+
3441 // Add packaging method from build configuration (Windows only)
42+ console . log ( '[CONFIG] Platform check:' , process . platform ) ;
43+ console . log ( '[CONFIG] Build config:' , JSON . stringify ( this . build , null , 2 ) ) ;
44+
3545 if ( process . platform === 'win32' && this . build && this . build . packagingMethod ) {
46+ console . log ( '[CONFIG] Adding METHOD parameter:' , this . build . packagingMethod ) ;
3647 params . append ( 'method' , this . build . packagingMethod ) ;
48+ } else {
49+ console . log ( '[CONFIG] METHOD parameter NOT added. Reasons:' ) ;
50+ console . log ( ' - Platform is Windows:' , process . platform === 'win32' ) ;
51+ console . log ( ' - Build config exists:' , ! ! this . build ) ;
52+ console . log ( ' - Packaging method exists:' , ! ! ( this . build && this . build . packagingMethod ) ) ;
3753 }
38-
39- // Add architecture information (ensure it's not undefined)
40- const arch = process . arch || 'unknown' ;
41- params . append ( 'arch' , arch ) ;
4254
43- return `${ baseUrl } ?${ params . toString ( ) } ` ;
55+ // Log all parameters before creating URL
56+ console . log ( '[CONFIG] All URL parameters:' ) ;
57+ for ( const [ key , value ] of params ) {
58+ console . log ( ` ${ key } = ${ value } ` ) ;
59+ }
60+
61+ const finalUrl = `${ baseUrl } ?${ params . toString ( ) } ` ;
62+ console . log ( '[CONFIG] Final generated URL:' , finalUrl ) ;
63+
64+ return finalUrl ;
4465 }
4566
4667 return baseUrl ;
0 commit comments