diff --git a/.changeset/many-terms-kiss.md b/.changeset/many-terms-kiss.md new file mode 100644 index 0000000000..c329d109b0 --- /dev/null +++ b/.changeset/many-terms-kiss.md @@ -0,0 +1,6 @@ +--- +'@finos/legend-application-repl-deployment': patch +'@finos/legend-application-repl': patch +--- + +BugFix REPL base url diff --git a/packages/legend-application-repl-deployment/src/index.tsx b/packages/legend-application-repl-deployment/src/index.tsx index e381e10129..b5318d6a0d 100644 --- a/packages/legend-application-repl-deployment/src/index.tsx +++ b/packages/legend-application-repl-deployment/src/index.tsx @@ -15,7 +15,8 @@ */ import { LegendREPLGridClientWebApplication } from '@finos/legend-application-repl'; -import config from '../repl.config.js'; import './index.scss'; -LegendREPLGridClientWebApplication.run(config.baseUrl); +// Resolve baseUrl relatively for application to work in vscode code-server +const relativeBaseUrl = new URL('./', window.location.href).pathname; +LegendREPLGridClientWebApplication.run(relativeBaseUrl); diff --git a/packages/legend-application-repl/src/application/LegendREPLGridClient.tsx b/packages/legend-application-repl/src/application/LegendREPLGridClient.tsx index a19c80e483..e0231abcd1 100644 --- a/packages/legend-application-repl/src/application/LegendREPLGridClient.tsx +++ b/packages/legend-application-repl/src/application/LegendREPLGridClient.tsx @@ -61,13 +61,11 @@ export class LegendREPLGridClient extends LegendApplication { baseUrl: string, ): Promise<[LegendApplicationConfig, ExtensionsConfigurationData]> { const client = new NetworkClient(); - // Resolve baseUrl relatively for application to work in vscode code-server - const relativeBaseUrl = new URL('./', window.location.href).pathname; // app config let configData: LegendREPLGridClientApplicationConfigData | undefined; try { configData = await client.get( - `${window.location.origin}${relativeBaseUrl}config.json`, + `${window.location.origin}${baseUrl}config.json`, ); } catch (error) { assertErrorThrown(error); @@ -85,7 +83,7 @@ export class LegendREPLGridClient extends LegendApplication { let versionData; try { versionData = await client.get( - `${window.location.origin}${relativeBaseUrl}version.json`, + `${window.location.origin}${baseUrl}version.json`, ); } catch (error) { assertErrorThrown(error);