.local env
This commit is contained in:
parent
24c7ec82ea
commit
c819cbf81f
2 changed files with 13 additions and 1 deletions
|
|
@ -1,6 +1,9 @@
|
|||
import * as fs from "node:fs";
|
||||
import { IdeSettings } from "..";
|
||||
import { getStagingEnvironmentDotFilePath } from "../util/paths";
|
||||
import {
|
||||
getLocalEnvironmentDotFilePath,
|
||||
getStagingEnvironmentDotFilePath,
|
||||
} from "../util/paths";
|
||||
|
||||
export interface ControlPlaneEnv {
|
||||
DEFAULT_CONTROL_PLANE_PROXY_URL: string;
|
||||
|
|
@ -78,6 +81,11 @@ export function getControlPlaneEnvSync(
|
|||
ideTestEnvironment: IdeSettings["continueTestEnvironment"],
|
||||
enableControlServerBeta: IdeSettings["enableControlServerBeta"],
|
||||
): ControlPlaneEnv {
|
||||
// Note .local overrides .staging
|
||||
if (fs.existsSync(getLocalEnvironmentDotFilePath())) {
|
||||
return LOCAL_ENV;
|
||||
}
|
||||
|
||||
if (fs.existsSync(getStagingEnvironmentDotFilePath())) {
|
||||
return STAGING_ENV;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -418,6 +418,10 @@ export function migrateV1DevDataFiles() {
|
|||
moveToV1FolderIfExists("autocomplete", "autocomplete");
|
||||
}
|
||||
|
||||
export function getLocalEnvironmentDotFilePath(): string {
|
||||
return path.join(getContinueGlobalPath(), ".local");
|
||||
}
|
||||
|
||||
export function getStagingEnvironmentDotFilePath(): string {
|
||||
return path.join(getContinueGlobalPath(), ".staging");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue