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

Generate Extension Info in server application #13590

Merged
merged 1 commit into from
Apr 24, 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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@

## not yet released

- [application-manager] Generate Extension Info in server application to avoid empty About Dialog [#13590](https://github.com/eclipse-theia/theia/pull/13590) - contributed on behalf of STMicroelectronics
- [scm] added support for dirty diff peek view [#13104](https://github.com/eclipse-theia/theia/pull/13104)

<a name="breaking_changes_not_yet_released">[Breaking Changes:](#breaking_changes_not_yet_released)</a>

- [scm] revised some of the dirty diff related types [#13104](https://github.com/eclipse-theia/theia/pull/13104)
- replaced `DirtyDiff.added/removed/modified` with `changes`, which provides more detailed information about the changes
- changed the semantics of `LineRange` to represent a range that spans up to but not including the `end` line (previously, it included the `end` line)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,8 @@ const main = require('@theia/core/lib/node/main');

BackendApplicationConfigProvider.set(${this.prettyStringify(this.pck.props.backend.config)});

globalThis.extensionInfo = ${this.prettyStringify(this.pck.extensionPackages.map(({ name, version }) => ({ name, version }))) };

const serverModule = require('./server');
const serverAddress = main.start(serverModule());

Expand Down
6 changes: 3 additions & 3 deletions packages/core/src/node/application-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ export class ApplicationServerImpl implements ApplicationServer {
protected readonly applicationPackage: ApplicationPackage;

getExtensionsInfos(): Promise<ExtensionInfo[]> {
const extensions = this.applicationPackage.extensionPackages;
const infos: ExtensionInfo[] = extensions.map(extension => ({ name: extension.name, version: extension.version }));
return Promise.resolve(infos);
// @ts-expect-error
const appInfo: ExtensionInfo[] = globalThis.extensionInfo;
return Promise.resolve(appInfo);
}

getApplicationInfo(): Promise<ApplicationInfo | undefined> {
Expand Down
Loading