Skip to content

Commit 0731941

Browse files
author
Calvinn Ng
committed
remove unused remote config.js synchronization
1 parent a0c1485 commit 0731941

File tree

1 file changed

+25
-25
lines changed

1 file changed

+25
-25
lines changed

core/config/load.ts

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -70,16 +70,16 @@ function resolveSerializedConfig(filepath: string): SerializedContinueConfig {
7070

7171
async function fetchRemoteConfig(url: string): Promise<any> {
7272
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;
8080
} catch (error) {
81-
console.error('Error fetching data: ', error);
82-
return null;
81+
console.error('Error fetching data: ', error);
82+
return null;
8383
}
8484
}
8585

@@ -442,7 +442,7 @@ async function loadFullConfigNode(
442442
ideType,
443443
);
444444

445-
editConfigJson( (input) => {
445+
editConfigJson((input) => {
446446
return serialized
447447
})
448448

@@ -465,21 +465,21 @@ async function loadFullConfigNode(
465465
}
466466

467467
// 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+
// }
483483

484484
const finalConfig = await intermediateToFinalConfig(intermediate, readFile);
485485
return finalConfig;

0 commit comments

Comments
 (0)