Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support customization of configuration area for customer application #14319

Merged
merged 1 commit into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

- [Previous Changelogs](https://github.com/eclipse-theia/theia/tree/master/doc/changelogs/)

## 1.55.0 - not yet release

- [application-package] feat: provide an application prop to set the configuration area [#14319](https://github.com/eclipse-theia/theia/pull/14319) - Contributed on behalf of STMicroelectronics

## 1.54.0 - 09/26/2024

- [ai] add Theia AI LLM Support [Experimental] [#14048](https://github.com/eclipse-theia/theia/pull/14048)
Expand Down
10 changes: 9 additions & 1 deletion dev-packages/application-package/src/application-props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,8 @@ export type BackendApplicationConfig = RequiredRecursive<BackendApplicationConfi
export namespace BackendApplicationConfig {
export const DEFAULT: BackendApplicationConfig = {
singleInstance: true,
frontendConnectionTimeout: 0
frontendConnectionTimeout: 0,
configurationFolder: '.theia'
};
export interface Partial extends ApplicationConfig {

Expand All @@ -206,6 +207,13 @@ export namespace BackendApplicationConfig {
* The time in ms the connection context will be preserved for reconnection after a front end disconnects.
*/
readonly frontendConnectionTimeout?: number;

/**
* Configuration folder within the home user folder
*
* Defaults to `.theia`
*/
readonly configurationFolder?: string;
}
}

Expand Down
3 changes: 2 additions & 1 deletion packages/core/src/node/env-variables/env-variables-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import { EnvVariable, EnvVariablesServer } from '../../common/env-variables';
import { isWindows } from '../../common/os';
import { FileUri } from '../../common/file-uri';
import { BackendApplicationPath } from '../backend-application';
import { BackendApplicationConfigProvider } from '../backend-application-config-provider';

@injectable()
export class EnvVariablesServerImpl implements EnvVariablesServer {
Expand Down Expand Up @@ -64,7 +65,7 @@ export class EnvVariablesServerImpl implements EnvVariablesServer {
this.pathExistenceCache[userDataPath] = true;
}
} else {
process.env.THEIA_CONFIG_DIR = join(homedir(), '.theia');
process.env.THEIA_CONFIG_DIR = join(homedir(), BackendApplicationConfigProvider.get().configurationFolder);
}
return FileUri.create(process.env.THEIA_CONFIG_DIR).toString();
}
Expand Down
Loading