@@ -70,16 +70,16 @@ function resolveSerializedConfig(filepath: string): SerializedContinueConfig {
70
70
71
71
async function fetchRemoteConfig ( url : string ) : Promise < any > {
72
72
try {
73
- const response = await fetch ( url ) ;
74
- if ( ! response . ok ) {
75
- throw new Error ( `HTTP error! status: ${ response . status } ` ) ;
76
- }
77
- const data = await response . json ( ) ;
78
- console . log ( data ) ;
79
- return data ;
73
+ const response = await fetch ( url ) ;
74
+ if ( ! response . ok ) {
75
+ throw new Error ( `HTTP error! status: ${ response . status } ` ) ;
76
+ }
77
+ const data = await response . json ( ) ;
78
+ console . log ( data ) ;
79
+ return data ;
80
80
} catch ( error ) {
81
- console . error ( 'Error fetching data: ' , error ) ;
82
- return null ;
81
+ console . error ( 'Error fetching data: ' , error ) ;
82
+ return null ;
83
83
}
84
84
}
85
85
@@ -442,7 +442,7 @@ async function loadFullConfigNode(
442
442
ideType ,
443
443
) ;
444
444
445
- editConfigJson ( ( input ) => {
445
+ editConfigJson ( ( input ) => {
446
446
return serialized
447
447
} )
448
448
@@ -465,21 +465,21 @@ async function loadFullConfigNode(
465
465
}
466
466
467
467
// Remote config.js
468
- if ( remoteConfigServerUrl ) {
469
- try {
470
- const configJsPathForRemote = getConfigJsPathForRemote (
471
- remoteConfigServerUrl ,
472
- ) ;
473
- const module = await require ( configJsPathForRemote ) ;
474
- delete require . cache [ require . resolve ( configJsPathForRemote ) ] ;
475
- if ( ! module . modifyConfig ) {
476
- throw new Error ( "config.ts does not export a modifyConfig function." ) ;
477
- }
478
- intermediate = module . modifyConfig ( intermediate ) ;
479
- } catch ( e ) {
480
- console . log ( "Error loading remotely set config.js: " , e ) ;
481
- }
482
- }
468
+ // if (remoteConfigServerUrl) {
469
+ // try {
470
+ // const configJsPathForRemote = getConfigJsPathForRemote(
471
+ // remoteConfigServerUrl,
472
+ // );
473
+ // const module = await require(configJsPathForRemote);
474
+ // delete require.cache[require.resolve(configJsPathForRemote)];
475
+ // if (!module.modifyConfig) {
476
+ // throw new Error("config.ts does not export a modifyConfig function.");
477
+ // }
478
+ // intermediate = module.modifyConfig(intermediate);
479
+ // } catch (e) {
480
+ // console.log("Error loading remotely set config.js: ", e);
481
+ // }
482
+ // }
483
483
484
484
const finalConfig = await intermediateToFinalConfig ( intermediate , readFile ) ;
485
485
return finalConfig ;
0 commit comments