diff --git a/package.json b/package.json index 2da5e47..9835303 100644 --- a/package.json +++ b/package.json @@ -161,6 +161,11 @@ "type": "boolean", "default": "false", "description": "" + }, + "firecoder.server.usePreRelease": { + "type": "boolean", + "default": false, + "description": "Use pre release server builds" } } } @@ -200,4 +205,4 @@ "@langchain/community": "^0.0.27", "langchain": "^0.1.17" } -} +} \ No newline at end of file diff --git a/src/common/download/index.ts b/src/common/download/index.ts index 82be9bb..0429bfb 100644 --- a/src/common/download/index.ts +++ b/src/common/download/index.ts @@ -87,8 +87,12 @@ const getServerInfo = async (): Promise => { const osmachine = os.machine(); let spec: Spec | null = null; try { + const specFile = configuration.get("server.usePreRelease") + ? "spec-pre-release.json" + : "spec.json"; + const response = await fetch( - "https://pub-ad9e0b7360bc4259878d0f81b89c5405.r2.dev/spec.json" + `https://pub-ad9e0b7360bc4259878d0f81b89c5405.r2.dev/${specFile}` ); if (!response.ok) { diff --git a/src/common/utils/configuration.ts b/src/common/utils/configuration.ts index 3e907f5..1c7d087 100644 --- a/src/common/utils/configuration.ts +++ b/src/common/utils/configuration.ts @@ -35,6 +35,9 @@ const ConfigurationProperties = { "cloud.use": { default: false, }, + "server.usePreRelease": { + default: false, + }, } as const; interface ConfigurationPropertiesType @@ -72,6 +75,9 @@ interface ConfigurationPropertiesType "cloud.use": { possibleValues: boolean; }; + "server.usePreRelease": { + possibleValues: boolean; + }; } class Configuration {